-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix Web Workers compatibility #2624
Conversation
Latest Webpack generated dist files no longder reference "window". Thus those generated files are compatible with Web Workers.
@Marsup Can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also get rid of null-loader
but I can do it if you don't want to.
browser/webpack.mocha.js
Outdated
WebpackConfig.plugins.push(new Webpack.ProvidePlugin({ | ||
process: 'process/browser', | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we can remove process
by doing this.
WebpackConfig.plugins.push(new Webpack.ProvidePlugin({ | |
process: 'process/browser', | |
})); | |
WebpackConfig.plugins.push(new Webpack.DefinePlugin({ | |
'process.env.NODE_DEBUG': false, | |
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated :)
@Marsup That doesn't seem to be related to the web compatibility issue that fixed in this PR. I have no idea about the context of that code piece. It will be helpful if you can take that part of the work. |
@Marsup Leaving this for you to merge. |
I'm merging this as is and will bring some modifications afterwards. @hueniverse I'll leave the version numbering to you, I'm not sure which applies in this case. |
@Marsup I assume this is not a breaking change? |
Unlikely, minor at best. |
Latest Webpack generated dist files no longer reference "window". Thus those
generated files are compatible with Web Workers.
Fixes #2251