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

Package detail

invalidate-assets-list-webpack-plugin

zyml10MIT0.1.2

webpack plugin that generates a list of asset paths to a JSON file for cache invalidation.

webpack, plugin, asset, assets, cache, invalidate

readme

invalidate-assets-list-webpack-plugin

npm version Build Status Test Coverage Dependency Status

Generate (selectively) a list of asset paths to a JSON file for cache invalidation.

Installation

npm i --save-dev invalidate-assets-list-webpack-plugin

Usage

// webpack.config.js
var InvalidateAssetsListPlugin = require('invalidate-assets-list-webpack-plugin');

module.exports = {
  // ...
  plugins: [
    new InvalidateAssetsListPlugin()
  ],
  // ...
};

Options

new InvalidateAssetsListPlugin(options)

options.filename

Exported JSON filename.

  • Default: invalidate-assets.json

options.hash

Appends hash as a query string to files that do not contain them: (e.g. helloWorld.js to helloWorld.js?1455678)

  • Default: false

options.ignore

List of glob patterns to ignore. Can be a String or an Array of Strings.

  • Default: []
  • Accepts patterns from minimatch

options.matchOptions

Options object for options.ignore glob patterns.

  • Default: { dot: true, matchBase: true }
  • Accepts options from minimatch

options.path

Path of the exported JSON.

  • Default: ''