生产环境 npm run build

来源:1-9 介绍webpack.production.config.js

慕粉210917370

2017-08-08

我的代码

"build": "rd/s/q build && set NODE_ENV=production && webpack --config ./webpack.production.config.js --progress --colors"

控制台报的错

1.Warning: It looks like you're using a minified copy of the development build of React. When deploying React apps to production, make sure to use the production build which skips development warnings and is faster. See https://fb.me/react-minification for more details.

2.vendor.e0681e98.js:23 You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build.

老师,小伙伴,是不是配置文件的问题?我应该怎么修改

写回答

2回答

双越

2017-08-17

0
1
慕粉210917370
非常感谢老师!最近太忙,没注意,不好意思
2017-08-31
共1条回复

双越

2017-08-08

这是浏览器控制台报错,还是命令控制台报错?

0
3
慕粉210917370
浏览器的控制台,倒是没觉得影响程序运行
2017-08-31
共3条回复

React高级实战 打造大众点评Web App

已经对React Router4与Webpack2进行了项目升级

1711 学习 · 707 问题

查看课程

相似问题