redux-first-router-demo
redux-first-router-demo copied to clipboard
Fix webpack.defineplugin use
First off: love the project. It's the best integration I've seen of the various techs at the bleeding-edge of frontend dev - and I've seen a few!
Just wanted to flag the use of definePlugin
in the sample webpack configs. It's not recommended to redefine the whole process.env variable, but rather just the variables that you care about (in this case process.env.NODE_ENV
). See: https://webpack.js.org/plugins/define-plugin/#feature-flags.
I got burned by this in production a bit ago for a project based on this demo boilerplate -- I tore my hair out for a while wondering why process.env
wasn't the same in my server index and my server-side code. I figured I'd save some other folks some time if they're doing the same!
thanks brother! ...feel free to PR
Will do when I get a sec. Startup life! On Tue, Feb 6, 2018 at 9:12 PM James Gillmore [email protected] wrote:
thanks brother! ...feel free to PR
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/faceyspacey/redux-first-router-demo/issues/37#issuecomment-363632692, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2wxJU3VQuDVvApbQSPTOkIs3aIa85Gks5tSQZ2gaJpZM4R37gJ .