Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

老板 umd 编译模式是不是不好使啊 #200

Open
chenlizan opened this issue May 8, 2020 · 1 comment
Open

老板 umd 编译模式是不是不好使啊 #200

chenlizan opened this issue May 8, 2020 · 1 comment

Comments

@chenlizan
Copy link

rc-tools run dist 不好用啊
gulpfile.js 558行的压缩是不是不兼容webpack4

最近想编译成umd格式的,看RC组件都改成了fatherJs。但我的TS代码fatherJs编译也有问题

我该怎么办呢

@chenlizan
Copy link
Author

  compressedWebpackConfig.plugins = webpackConfig.plugins.concat([
    // new webpack.optimize.UglifyJsPlugin({
    //   compress: {
    //     screw_ie8: true, // React doesn't support IE8
    //     warnings: false,
    //   },
    //   mangle: {
    //     screw_ie8: true,
    //   },
    //   output: {
    //     comments: false,
    //     screw_ie8: true,
    //   },
    // }),
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
    }),
  ]);

注释掉压缩代码竟然成功编译了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant