You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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 caseprocess.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!The text was updated successfully, but these errors were encountered: