-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omitting the process
Webpack polyfill can cause issues
#689
Comments
FWIW webpack is removing default polyfilling. Part of the reasoning was usage of Node built-ins usually indicates a situation where a Node.js dependency was erroneously being bundled. That said, I do think it would be better to include all polyfills by default, but issue warnings if they are ever used. |
Probably worth adding the config to restore the webpack polyfill in a Fusion app here, for those who need it. Add the following to
|
@ericsoco thanks so much. I was having this issue and couldn't understand what's happening. |
Here's another one I just came across, in this case requiring:
I suppose the list may go on and on. I hope Webpack does a good job broadcasting the change to remove polyfilling as they roll out v5. |
process is very much important object please either give a way to polyfil process in frontend applications. |
Fusion's Webpack config intentionally omits the
process
polyfill.I'm filing this issue not to suggest specific action, but to highlight that this can cause difficult-to-debug issues with libraries that reference
process
directly in a way that is not e.g. compatible withEnvironmentPlugin
(i.e.process.env
checks).Here's an example we ran into with
react-markdown
, which led us tovfile
.What does Fusion gain by not polyfilling
process
(which runs contrary to the default in Webpack and also Browserify), other than saving a few bytes in the bundle?The text was updated successfully, but these errors were encountered: