码迷,mamicode.com
首页 > 其他好文 > 详细

react+mobx+antd按需加载 出现Support for the experimental syntax 'decorators-legacy' isn't currently enabled

时间:2019-03-01 00:26:23      阅读:1067      评论:0      收藏:0      [点我收藏+]

标签:import   enable   syn   div   gac   The   按需加载   需要   nbsp   

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

标签:import   enable   syn   div   gac   The   按需加载   需要   nbsp   

原文地址:https://www.cnblogs.com/umbrellar/p/10454206.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!