generator-react-webpack-redux
generator-react-webpack-redux copied to clipboard
REACT_HOT_LOADER in production build
Hi, I'm seeing an issue where production code contains multiple instances of __REACT_HOT_LOADER__.register(_default, 'default', '/Users/username/…'); when running npm run dist ... even on a fresh project.
I don't have a lot of knowledge about webpack configurations, so I had trouble tracing the issue. I'm hoping someone here can help. Thanks.
I revisited this and tracked this issue to the process.env.NODE_ENV not being set to 'production' in webpack.config.js. See: https://github.com/gaearon/react-hot-loader/issues/357.
To correct this, I updated conf/webpack/Dist.js from:
get env() { return 'dist'; }
to:
get env() { return 'production'; }