Skip to content
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

Make use of AssetInfo in webpack build #2673

Merged
merged 2 commits into from
Nov 13, 2020
Merged

Conversation

jeffposnick
Copy link
Contributor

R: @Snugug @housseindjirdeh @philipwalton

Fixes #2221, fixes #2672

Some small changes to the workbox-webpack-plugin to take proper advantage of webpack's AssetInfo capabilities.

When we create an asset via GenerateSW and we know that it's already been compressed, we now set minimized: true.

When we read assets from the build to generate our precache manifest, if any assets have immutable: true, that's a clear sign that we don't need to generate hashes for them, so we can return null for the revision parameter. The JSDoc for dontCacheBustURLsMatching has also been updated to reflect this.

Copy link
Contributor

@Snugug Snugug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM from the comments from other webpack threads, but could probably use a LGTM from someone who knows webpack 6 better than I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set minimized: true on the GenerateSW-created asset Use webpack v5's immutable asset metadata
2 participants