-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Integrity hashes do not work if contenthash is a query string #1269
Comments
Kocal
added a commit
that referenced
this issue
Sep 20, 2024
…al plugin, to generate `entrypoints.json` file (Kocal) This PR was merged into the main branch. Discussion ---------- Replace `assets-webpack-plugin` dependency by an internal plugin, to generate `entrypoints.json` file | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes <!-- please update CHANGELOG.md file --> | Deprecations? | no <!-- please update CHANGELOG.md file --> | Issues | Fix #969 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT This PR replaces the https://github.com/ztoben/assets-webpack-plugin dependency with an internal plugin, this allows us: - to drop a dependency, and simplify the code (we don't need 10 ~options to generate the `entrypoints.json` for the WebpackEncoreBundle) - to not depend on https://github.com/waysact/webpack-subresource-integrity, which is necessary to use the `integrity` options of https://github.com/ztoben/assets-webpack-plugin - to generate the integrity data **after** files have been emitted **Things done in this PR:** - Re-implement https://github.com/ztoben/assets-webpack-plugin functionality as closely as possible - Ensure tests pass without any modifications - Ensure the branch works like before on a real project (in dev/prod/dev-server, with or without integrity hashes) **Things not done in this PR:** - #1269 will have to wait for another PR, I don't wanted to fix that here Commits ------- 0529865 Replace `assets-webpack-plugin` dependency by an internal plugin, to generate `entrypoints.json` file
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
If you are using the
[contenthash]
as a query string, the integrity hashes are not generated.Example webpack.config.js
Generated entrypoints.json
The problem exists, because
entry-files-manifest.js
assumes the filename is a a valid file:webpack-encore/lib/plugins/entry-files-manifest.js
Lines 52 to 57 in 6b75c4d
If the query string would be stripped, the file path should be correct.
The text was updated successfully, but these errors were encountered: