Reorganize frontend and install Craco to alias modules (#190)
This commit is contained in:
20
front/craco.config.js
Normal file
20
front/craco.config.js
Normal file
@ -0,0 +1,20 @@
|
||||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
webpack: {
|
||||
alias: {
|
||||
'~': path.resolve(__dirname, 'src'),
|
||||
'@': path.resolve(__dirname, 'src/modules'),
|
||||
'@testing': path.resolve(__dirname, 'src/testing'),
|
||||
}
|
||||
},
|
||||
jest: {
|
||||
configure: {
|
||||
"moduleNameMapper": {
|
||||
'~/(.+)': "<rootDir>/src/$1",
|
||||
'@/(.+)': "<rootDir>/src/modules/$1",
|
||||
'@testing/(.+)': "<rootDir>/src/testing/$1",
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user