Reorganize frontend and install Craco to alias modules (#190)
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
webpackFinal: config => {
|
||||
config.module.rules.push({
|
||||
@ -19,6 +21,11 @@ module.exports = {
|
||||
type: 'javascript/auto'
|
||||
});
|
||||
config.resolve.extensions.push('.mjs');
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'~': path.resolve(__dirname, "../src"),
|
||||
'@': path.resolve(__dirname, "../src/modules"),
|
||||
};
|
||||
return config;
|
||||
},
|
||||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
||||
Reference in New Issue
Block a user