invalidate-assets-list-webpack-plugin

0.1.2 • Public • Published

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: ''

Package Sidebar

Install

npm i invalidate-assets-list-webpack-plugin

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • zyml