jhen0409 / react-chrome-extension-boilerplate

Boilerplate for Chrome Extension React.js project
MIT License
2.14k stars 388 forks source link

Remove __DEVELOPMENT__ constant #10

Closed zalmoxisus closed 8 years ago

zalmoxisus commented 8 years ago

Are any reasons of using webpack __DEVELOPMENT__ constant while we have process.env.NODE_ENV? Doesn't uglify remove dead code in the latter case?

jhen0409 commented 8 years ago

Thanks! but I think the process.env.NODE_ENV is unsuitable, because Chrome Extension isn’t node. :|

I would use __DEVTOOLS__ and__DEVTOOLS_EXT__ to use redux-devtools and redux-devtools-extension in the future.

zalmoxisus commented 8 years ago

Yes, it is fair, but about using together __DEVELOPMENT__ and process.env.NODE_ENV meaning the same could be confusing. The pro for the latter is that our submodules (including react and redux) already use it.

Like we already may set process.env.HOT in the react-transform-hmr, we can use process.env.DEVTOOLS. But of course it's a matter of taste :)