-
Notifications
You must be signed in to change notification settings - Fork 799
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 plugin updates for v5 #2087
Conversation
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 good to me so far (with a few minor nits). I haven't played with the logic yet, but it's great to see so much fo the previous code removed!
packages/workbox-build/src/entry-points/options/webpack-common.js
Outdated
Show resolved
Hide resolved
packages/workbox-build/src/entry-points/options/webpack-inject-manifest-schema.js
Outdated
Show resolved
Hide resolved
Okay, the tests are updated. Post-merge, I think we should be good to cut the first v5 alpha and start getting feedback on the new build tools. |
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.
LGTM. I checked the branch out and tried it against one of my webpack projects with code splitting, and it worked exactly as I would expect. I also tried it with the inlineWorkboxRuntime: true
option and it worked as I would expect there as well.
I didn't check all the options, but I'm confident it's good enough for alpha, so let's cut a release and get it in front of real users! 🎉
PR-Bot Size PluginChanged File Sizes
New FilesNo new files have been added. All File SizesView Table
Workbox Aggregate Size Plugin8.97KB gzip'ed (60% of limit) |
* Initial GenerateSW changes. * WIP. * Basic InjectManifest functionality. * Normalize webpack option validation. * Working-ish? * Copy over some compiler options. * More mode magic * Manifest transformations should work * Normalized error reporting a bit. * Switch to Proxx's loadz0r config * Tweak the default exclude * Play nicely with SplitChunkPlugin * Add a warning about missing chunks. * Rename a test. * Updated a few comments. * Test-related updates * Further test fixes. * Pretty complete GenerateSW test suite. * InjectManifest tests. * Linting. * Copyright dates. * Update jsdoc-baseline * lockfile update * Fix the generate-sw test on Windows. * Switch to upath * Fix a proxied call to upath * Missed a @Private * A few nits.
R: @philipwalton
This includes a pretty large refactoring of both of the webpack plugins, to match the proposed design and behavior for v5.
In general, a lot of the webpack code has gotten simpler, and we're sharing more with
workbox-build
, which should lead to better consistency.I have not yet updated any of the tests, and I'll be working on that, but I wanted to give you a chance to look at the code changes first.
Additionally, I think a refactoring of the code under https://github.com/GoogleChrome/workbox/tree/wepback-v5/packages/workbox-build/src/entry-points/options is probably in order, as that's now a grab bag of things used directly by both
workbox-build
andworkbox-webpack-plugin
. I'd like to save that for a different PR, though.Fixes #2064, fixes #2059, fixes #2039, fixes #1859, fixes #2021, fixes #2012, fixes #1854, fixes #1774, fixes #1591, fixes #1543, fixes #1363, fixes #1556, fixes #1529, fixes #1454, fixes #1338, fixes #1287, fixes, #1373, fixes #1227, fixes #1513, fixes #1493, fixes #1485