baidu上面的说法大多是在 项目的package.json 中添加decorators-legacy
因为引入了antd的按需加载 所以只需要在config-overrides.js中添加addDecoratorsLegacy()
const { override, fixBabelImports,addDecoratorsLegacy } = require(‘customize-cra‘);
module.exports = override(
fixBabelImports(‘import‘, {
libraryName: ‘antd‘,
libraryDirectory: ‘es‘,
style: ‘css‘,
}),addDecoratorsLegacy(),
);
react+mobx+antd按需加载 出现Support for the experimental syntax 'decorators-legacy' isn't currently enabled
原文地址:https://www.cnblogs.com/umbrellar/p/10454206.html
时间: 2024-10-27 01:30:49