Closed AnujRNair closed 4 years ago
Merging #58 into master will increase coverage by
0.20%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #58 +/- ##
==========================================
+ Coverage 93.85% 94.06% +0.20%
==========================================
Files 2 2
Lines 114 118 +4
Branches 22 22
==========================================
+ Hits 107 111 +4
Misses 6 6
Partials 1 1
Impacted Files | Coverage Δ | |
---|---|---|
plugin.js | 92.70% <100.00%> (+0.31%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f05fd49...b56efa7. Read the comment docs.
Awesome! Thanks!
Nice! Give the people what they want! One little nit, but otherwise looks good. +1
I've now merged this and bumped the npm package version - thanks for the reviews!
Summary
This PR allows a developer to define a custom
processFn
method to overwrite the default behaviour of inlining the policy into the head of the document we're currently processing.Covers a request from https://github.com/slackhq/csp-html-webpack-plugin/pull/44, and an issue raised in https://github.com/slackhq/csp-html-webpack-plugin/issues/57
Implementation Details
defaultProcessFn
function, and made it the default behaviour so as to be backwards compatible.CspHtmlWebpackPlugin
additionalOpts
object, or from theHtmlWebpackPlugin
instancecspPlugin
object. This can allow for different processing functions perHtmlWebpackPlugin
instance