2021-07-29 14:42:39 -05:00
|
|
|
'use strict';
|
2021-07-11 08:08:38 -05:00
|
|
|
|
2021-07-29 14:42:39 -05:00
|
|
|
const path = require('path');
|
2021-07-11 08:08:38 -05:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
options: {
|
2021-07-29 14:42:39 -05:00
|
|
|
buildType: 'spa',
|
2021-07-11 08:08:38 -05:00
|
|
|
},
|
2021-07-29 14:42:39 -05:00
|
|
|
plugins: ['scss'],
|
2021-07-11 08:08:38 -05:00
|
|
|
modifyWebpackConfig: ({ webpackConfig }) => {
|
2021-07-13 10:03:02 -05:00
|
|
|
/** @type {import('webpack').Configuration} **/
|
2021-07-11 08:08:38 -05:00
|
|
|
const config = { ...webpackConfig };
|
|
|
|
|
|
|
|
config.resolve.alias = {
|
2021-07-29 14:42:39 -05:00
|
|
|
'@': path.resolve('src/'),
|
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
modifyJestConfig: ({ jestConfig }) => {
|
|
|
|
/** @type {import('@jest/types').Config.InitialOptions} **/
|
|
|
|
const config = { ...jestConfig };
|
|
|
|
|
|
|
|
config.moduleNameMapper = {
|
|
|
|
...config.moduleNameMapper,
|
|
|
|
'^.+\\.(css|less|scss)$': 'babel-jest',
|
|
|
|
'@/(.*)': '<rootDir>/src/$1',
|
2021-07-11 08:08:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
};
|