const { override,fixBabelImports,addDecoratorsLegacy } = require("customize-cra");
const rewireProvidePlugin = require("react-app-rewire-provide-plugin");
module.exports = function(config,env) {
config.plugins.push(
rewireProvidePlugin(config,env,{
"window.BMap": "BMap"
})
);
return Object.assign(
config,override(
/*启动装饰器 /
addDecoratorsLegacy(),/*配置antd /
fixBabelImports("import",{
libraryName: "antd",libraryDirectory: "es",style: "css"
})
)(config,env)
);
};
原文链接:https://www.f2er.com/note/411491.html