Open warnyul opened 1 day ago
It seems that removing the following SCSS definitions resolves the issue. With these definitions removed, the CSP plugin and the inline CSS plugin use the same CSS, resulting correct hashes:
> * {
// style definition
}
Description
When
html-inline-css-webpack-plugin
is used alongsidecsp-html-plugin-webpack-plugin
, the CSP plugin generates invalid hash values in the content security policy. This issue does not occur whenhtml-inline-css-webpack-plugin
is not used.Steps to Reproduce
npm i && npm run build
.Expected Behaviour
The
csp-html-plugin-webpack-plugin
should generate valid CSP hashes regardless of the use ofhtml-inline-css-webpack-plugin
.Actual Behaviour
When
html-inline-css-webpack-plugin
is used, the hashes generated by the CSP plugin are invalid and do not match the content in the HTML.Environment
html-inline-css-webpack-plugin: 1.11.2 csp-html-plugin-webpack-plugin: 5.1.0 Webpack: 5.96.1 Node.js: 22.10.0 OS: macOs Sequoia 15.0.1 (24A348), Ubuntu 24.04