webpack-manifest-replace-plugin

2.0.0 • Public • Published

webpack-manifest-replace-plugin

npm download Build Status

Webpack plugin to replace assets path using manifest context.

Install

# for webpack 5
npm install --save-dev webpack-manifest-replace-plugin

# for webpack 4
npm install --save-dev webpack-manifest-replace-plugin@1.0.0

# for webpack 3
npm install --save-dev webpack-manifest-replace-plugin@0.0.4

Usage

⚠️ webpack-manifest-replace-plugin >= 1.0.0 is no longer required manifest.json file.

const ManifestReplacePlugin = require('webpack-manifest-replace-plugin');

module.exports = {
  ...
  plugins: [
    new ManifestReplacePlugin({
      include: path.resolve(__dirname, 'src'),
      test: /\.(jsp|php|htm|html)$/,
    })
  ]
  ...
};

Options

Name Type Default Description
include {String} undefined Files to include.
test {Pattern} /\.(htm|html)$/ Test to match files against.
outputDir {String} Webpack output.path Output directory for replaced files.

License

MIT © 2017 unchai

Package Sidebar

Install

npm i webpack-manifest-replace-plugin

Weekly Downloads

4

Version

2.0.0

License

MIT

Unpacked Size

12.1 kB

Total Files

17

Last publish

Collaborators

  • unchai