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 #367

Closed
adamyonk opened this issue Sep 19, 2016 · 2 comments
Closed

REACT_HOT_LOADER in production build #367

adamyonk opened this issue Sep 19, 2016 · 2 comments

Comments

@adamyonk
Copy link

adamyonk commented Sep 19, 2016

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?

@calesce
Copy link
Collaborator

calesce commented Sep 19, 2016

See #357, make sure you have process.env.NODE_ENV set to production during the build.

@calesce calesce closed this as completed Sep 19, 2016
@adamyonk
Copy link
Author

Ugh, yeah. Thanks for the tip.

Don't:
webpack --define process.env.NODE_ENV='\"production\"'

Do:
NODE_ENV=production webpack

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

2 participants