I see a lot of churn in our production build having to do with areas like this:
(function () {
if (typeof __REACT_HOT_LOADER__ === 'undefined') {
return;
}
__REACT_HOT_LOADER__.register(set, 'set', '/Users/username/…');
__REACT_HOT_LOADER__.register(_default, 'default', '/Users/username/…');
})();
Depending on who builds from what machine, that /Users/user bit changes all the time. Is there some way that I'm missing to exclude that from production builds?
See #357, make sure you have process.env.NODE_ENV set to production during the build.
Ugh, yeah. Thanks for the tip.
Don't:
webpack --define process.env.NODE_ENV='\"production\"'
Do:
NODE_ENV=production webpack
Most helpful comment
Ugh, yeah. Thanks for the tip.
Don't:
webpack --define process.env.NODE_ENV='\"production\"'Do:
NODE_ENV=production webpack