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

关于webpack #39

Open
Seasons123 opened this issue Aug 3, 2017 · 5 comments
Open

关于webpack #39

Seasons123 opened this issue Aug 3, 2017 · 5 comments

Comments

@Seasons123
Copy link
Owner

Seasons123 commented Aug 3, 2017

使用less方法
webpack+ES6+less开发环境搭建
http://blog.csdn.net/sinat_17775997/article/details/52434604
(实验过可以,暂时先不用less了)

@Seasons123
Copy link
Owner Author

@Seasons123
Copy link
Owner Author

@Seasons123
Copy link
Owner Author

webpack中output配置项中chunkFilename属性的用法,这个项目中没有使用到这个commonjs的异步加载

@Seasons123
Copy link
Owner Author

webpack.config.js中:

var isProduction = function () {
  return process.env.NODE_ENV === 'production';
};

如何告诉 React 它应该编译生产环境版本?
通常情况下我们会使用 Webpack 的 DefinePlugin 方法来将 NODE_ENV 变量值设置为 production。编译版本中 React 会忽略 propType 验证以及其他的告警信息,同时还会降低代码库的大小,React 使用了 Uglify 插件来移除生产环境下不必要的注释等信息。

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