0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/ui/razzle.config.js

33 lines
690 B
JavaScript
Raw Normal View History

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 }) => {
/** @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;
},
};