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

Add simple Production section #650

Conversation

AlexanderTserkovniy
Copy link

Production section explains how to get rid out of HMR error and warn logs after production compilation.

It contains plain recommendations for production bundling.

Fix #649

@jsf-clabot
Copy link

jsf-clabot commented Jan 16, 2017

CLA assistant check
All committers have signed the CLA.


### Production

Minimal steps in order to get rid out of the HMR on production. As webpack sets `NODE_ENV` for working files only, we need to specify it before webpack for production is onvoked.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/s/onvoked/invoked


### Production

Minimal steps in order to get rid out of the HMR on production. As webpack sets `NODE_ENV` for working files only, we need to specify it before webpack for production is onvoked.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to get rid out of the" -> "to get rid of"

@AlexanderTserkovniy AlexanderTserkovniy force-pushed the production-section-for-hmr branch 2 times, most recently from deefd28 to 61b5954 Compare January 17, 2017 09:01
…logs after production compilation.

It contains plain recommendations for production bundling.

Fix webpack#649
Fix typos after review.
@AlexanderTserkovniy
Copy link
Author

Have fixed everything.

The Alexander Tserkovniy user was used by mistake, please check that in the commit there is no such user.

@bebraw
Copy link
Contributor

bebraw commented Jan 17, 2017

I wonder if it would make sense to link to the production article at the end and merge this information there. That would keep this on topic.

@AlexanderTserkovniy
Copy link
Author

Up to you guys, but in my opinion if I want precisely HMR for production, I would look for solution in HMR article.

@bebraw
Copy link
Contributor

bebraw commented Jan 17, 2017

Ah, I understand now. I handle the situation quite differently myself. I go with an inverse approach and add HMR to the development configuration avoiding the problem entirely.

But better wait for further comments.

@SpaceK33z
Copy link
Member

@bebraw I also do it like you. Resetting the plugins array is very tricky and only works if you don't have any other plugins. Same with the entry property. This might cause very weird bugs. I think the inverse approach (only adding it in dev mode) makes more sense.

@bebraw
Copy link
Contributor

bebraw commented Jan 27, 2017

Yeah, let's skip this one. That said, inverse approach or hinting about it would work.

@bebraw bebraw closed this Jan 27, 2017
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

Successfully merging this pull request may close these issues.

None yet

4 participants