webpack-extract-subresource-integrity
v0.1.0
Published
work with webpack-subresource-integrity, extract integrity infomation into a seperate file
Downloads
7
Maintainers
Readme
webpack-extract-subresource-integrity
This plugin work with webpack-subresource-integrity, it extract all integrity infomation into a single file.
config example
const SriPlugin = require("webpack-subresource-integrity");
const ExtractSriPlugin = require("webpack-extract-subresource-integrity");
const webpackConfig = {
// ...
plugins: [
new SriPlugin({
hashFuncNames: ["sha256", "sha384"]
}),
new ExtractSriPlugin({
name: "subresource-integrity.json"
extensions: ['js', 'css']
})
]
};
params
| param | type | usage | default value |
| ---------------- | ---------- | --------------------------------------------------------------------------------------------------- | ---------------------------- |
| name | string
| set the name of the extracted file | subresource-integrity.json
|
| extensions | string[]
| what kinds of files to extract integrity for | ['js', 'css']
|
| appendPublicPath | boolean
| whether to append webpackConfig.output.publicPath(if exist) to the file names in the extracted file | true
|