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

REACT_HOT_LOADER in production build #79

Open
curly33 opened this issue Apr 25, 2017 · 1 comment
Open

REACT_HOT_LOADER in production build #79

curly33 opened this issue Apr 25, 2017 · 1 comment

Comments

@curly33
Copy link

curly33 commented Apr 25, 2017

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.

@curly33
Copy link
Author

curly33 commented Aug 31, 2017

I revisited this and tracked this issue to the process.env.NODE_ENV not being set to 'production' in webpack.config.js. See: gaearon/react-hot-loader#357.

To correct this, I updated conf/webpack/Dist.js from:
get env() { return 'dist'; }

to:
get env() { return 'production'; }

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