-
Notifications
You must be signed in to change notification settings - Fork 60
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
webpack v5 support #161
Comments
I've investigated this, and the API for WP5 has changed a bit, and a lot of the changes this plugin makes would be considered 'hacks' around the API. I spent a little bit hacking them back into place but honestly it would likely be better for someone to do it from scratch rather than modify this plugin. |
As you noticed, in many ways this plugin has had to work around limitations in extending webpack. Every major version update of webpack equates to many many hours of testing and dev work. While I'd like to support webpack 5, right now I just don't have the time to devote to that endeavor. |
Is there anything from a webpack side of things you need help with? |
Is there any update on this? |
Hi, we migrated to webpack 5 and would be neat to have support of this plugin |
This alternative did the trick for me: https://www.npmjs.com/package/google-closure-library-webpack-plugin |
This involves webpack itself, its CLI, and then various plugins: clean-webpack-plugin compression-webpack-plugin copy-webpack-plugin eslint-webpack-plugin (replaces eslint-loader) It seems there is no closure-webpack-plugin release for webpack 5 (see webpack-contrib/closure-webpack-plugin#161), so try webpack's default minimiser, terser, instead. Results are that build times are comparable, and runtime for the complete set of unit tests is c.1% slower. Cuts down number of packages installed, from added 742 packages, and audited 743 packages to added 449 packages, and audited 450 packages Also gets rid of various deprecation warnings: [email protected]: See https://github.com/lydell/source-map-url#deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated [email protected]: This loader has been deprecated. Please use eslint-webpack-plugin [email protected]: https://github.com/lydell/resolve-url#deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated [email protected]: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies [email protected]: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. Breakages in build will be addressed in commits to follow.
Using: npm install --legacy-peer-deps allows me to use webpack 5. would be nice to have this in the repo, though. |
https://www.npmjs.com/package/google-closure-library-webpack-plugin does not have even example of how to use it Any updates on webpack v5? |
👋 I'm interested in using GCC with the latest version of Webpack (v5) but there seems to be an internal plugin issue. So far I've upgraded the demos to the latest dependency versions and included the error below. I've also checked to see if there is a v5 working branch but didn't see one. I'm happy to contribute to help get the latest webpack version supported but unsure if there is already work in-progress. Thanks for your time.
I get the following error after upgrading the
es5-and-es6
demo:The text was updated successfully, but these errors were encountered: