解决不能用@修饰器问题
parent
02f642bf96
commit
c2fee2b3f9
@ -1,7 +1,12 @@
|
||||
const rewireMobX = require('react-app-rewire-mobx');
|
||||
const path = require('path')
|
||||
const { override, addDecoratorsLegacy } = require('customize-cra')
|
||||
|
||||
module.exports = function override(config, env) {
|
||||
config = rewireMobX(config, env);
|
||||
return config;
|
||||
};
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
const customize = () => (config, env) => {
|
||||
config.resolve.alias['@'] = resolve('src')
|
||||
return config
|
||||
};
|
||||
module.exports = override(addDecoratorsLegacy(), customize())
|
||||
|
Loading…
Reference in New Issue