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

Upgrade assets-webpack-plugin to ^7.1, leverage integrity calculations to assets-webpack-plugin and webpack-subresource-integrity #1341

Closed
wants to merge 1 commit into from

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Sep 16, 2024

Q A
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #969
License MIT

Proposal for #969, but the PR is not ready yet:

  1. I want feat: compatibility with webpack-subresource-integrity@5.1.0 ztoben/assets-webpack-plugin#452 to be merged/released, because the version 1.x has been unmaintained 4 years ago
  2. The way that assets-webpack-plugin add integrity hashes to the entrypoints.json is different that our actual format, it's a breaking change (that will impact Encore and WebpackEncoreBundle users), but maybe it can be avoided with processOutput
  3. I still need to add/update tests

…s to assets-webpack-plugin and webpack-subresource-integrity
@@ -558,6 +585,10 @@ class ConfigGenerator {
splitChunks
);

if (this.webpackConfig.useIntegrity > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

why > 0 while it is a boolean ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Bad search/replace, before introducing webpackConfig.useIntegrity, I've used webpackConfig.integrityAlgorithms.length > 0 to check if integrity was enabled.

@@ -216,6 +217,9 @@
},
"webpack-notifier": {
"optional": true
},
"webpack-subresource-integrity": {
"optional": true
Copy link
Member

Choose a reason for hiding this comment

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

listing it here without putting it in peerDependencies does not make sense.

@Kocal
Copy link
Member Author

Kocal commented Sep 16, 2024

Closing in favor of a new PR, which will drop assets-webpack-plugin and create the entrypoints.json file from an internal plugin.

@Kocal Kocal closed this Sep 16, 2024
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.

Entrypoints integrity workaround needed to allow for assets-webpack-plugin or higher
2 participants