Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

webpack-extract-subresource-integrity

work with webpack-subresource-integrity, extract integrity infomation into a seperate file

webpack, subresource-integrity

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