Refactors, Features, and some small Breaking Changes
Pre-release
Pre-release
·
80 commits
to master
since this release
Breaking Changes:
disableCspPlugininHtmlWebpackPluginoptions has been removed, and replaced bycspPlugin.enabledto be more inline with theenabledflag on theCspHtmlWebpackPlugin- Disabling the plugin in any way will now not touch the original HTML. Previously we were attempting to look for an empty CSP policy meta tag and remove that, but this will no longer be done.
New Features:
- Policies can now be defined in the HtmlWebpackPlugin instance via
cspPlugin.policyto allow individual policies to be created per HtmlWebpackPlugin - Nonce attrs will now be added onto externally loaded scripts
- If no csp meta tag is defined, one will be added as the very first tag in the head of the document.
strict-dynamicis now backwards compatible with CSP2 by ensuring it's the last defined source in a particular policy- Basic policy validations are now in place to ensure that all static sources are properly quoted