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
It looks like react expect process.env.NODE_ENV === 'production' in order to load the production version of the library. Since I saw the development version of react-dom getting loaded in a stack trace I've logged the actual value of process.env.NODE_ENV that react is getting:
And it's undefined, so I guess the webpack configuration generated by electron-webpack doesn't properly use:
It looks like for this particular case it doesn't matter what 'process.env.NODE_ENV' is set to, since those dependencies are loaded as external dependencies.
It's probably still a good idea to set process.env.NODE_ENV === "production" though, as our apps' code may do something differently depending on this, and dead code elimination might help shave some bytes off the bundle.
It should also be mentioned somewhere in the docs that one would probably want to set process.env.NODE_ENV === "production" somewhere manually, or mess with external dependencies.
It looks like react expect
process.env.NODE_ENV === 'production'
in order to load the production version of the library. Since I saw the development version ofreact-dom
getting loaded in a stack trace I've logged the actual value ofprocess.env.NODE_ENV
that react is getting:And it's
undefined
, so I guess the webpack configuration generated byelectron-webpack
doesn't properly use:Also if I set that manually into my custom webpack configuration nothing seems to change.
@develar I'd like to submit a PR for fixing this, any suggestion at where should I make the changes in the codebase?
The text was updated successfully, but these errors were encountered: