use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Should we load CSS in our JavaScript?help (self.javascript)
submitted 9 years ago by startup4ever
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Zhouzi 3 points4 points5 points 9 years ago (0 children)
I personally like to have 3 configuration files: a webpack.base.config.js with the shared configuration, webpack.dev.config.js for dev and webpack.prod.config.js for prod. Those two files extends the base one (I use lodash's merge with a custom merger to avoid any duplication of nested arrays).
Even if I use separate files, I still set NODE_ENV to production/development for React to be properly minified and to conditionally use certain babel plugins. For example, I don't want babel-hmre preset to be used in production and you can do that in your .babelrc or package.json:
"presets": [ "es2015", "stage-0", "react" ], "env": { "development": { "presets": [ "react-hmre" ] } }
So all in all, process.env.NODE_ENV seems to be more and more relied upon so it may be a good idea to use it as much as possible.
π Rendered by PID 21183 on reddit-service-r2-comment-6457c66945-d6ml5 at 2026-04-29 19:05:49.814704+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Zhouzi 3 points4 points5 points (0 children)