如何从生产版本中删除webpack dev-server

时间:2016-04-14 07:17:04

标签: webpack production

当我运行“生产版”时,我遇到了以下错误。我试着设置NODE_ENV =生产。

warning.js:14You 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 


dev-server.js:62 Uncaught Error: [HMR] Hot Module Replacement is disabled.

我有以下webpack插件。

new webpack.DefinePlugin({
                    'process.env': {
                        'NODE_ENV': JSON.stringify('production')
                    }
                })

0 个答案:

没有答案