4 ms·
I think the webpack documentation is missing the "why" in a lot of cases, so I sometimes find it difficult to map my problems to the right area of docs. The "v
by garysieling 10y ago
I think the webpack documentation is missing the "why" in a lot of cases, so I sometimes find it difficult to map my problems to the right area of docs.
The "vendor" and module splitting are good examples of this. Or, in this example, using "process.env.NODE_ENV" makes a lot of sense if you use Heroku, but is more cosmetic if you control the entire build chain.
- deleted 10y ago[deleted]
- K0nserv 10y agoNODE_ENV is just a convention though. Not specific to Heroku even if they might have popularized it.
- acemarke 10y agoI wrote a blog post recently that tries to clarify how and why `process.env.NODE_ENV` relates to JS build optimization: http://blog.isquaredsoftware.com/2016/11/posts-on-packtpub-generic-redux-modals-and-building-better-bundles/ http://blog.isquaredsoftware.com/2016/11/posts-on-packtpub-g... .
- garysieling 10y agoThat's really interesting, I didn't realize so many libraries depended on it, or that you could set it, thanks!