chunk-manifest-inject2html-webpack-plugin

1.0.2 • Public • Published

chunk-manifest-inject2html-webpack-plugin

The only difference is when you use html-webpack-plugin. It will inject the manifest json to you html instead of generate a json file. So you can cache the runtime file even manifest file changed everytimes.

Use chunk-manifest-webpack-plugin instead if you don't need this further.

Usage

Install via npm:

npm install chunk-manifest-inject2html-webpack-plugin

Install via yarn:

yarn add chunk-manifest-inject2html-webpack-plugin

And then require and provide to webpack:

// in webpack.config.js or similar
var ChunkManifestPlugin = require('chunk-manifest-inject2html-webpack-plugin');

module.exports = {
  // your config values here
  plugins: [
    new ChunkManifestPlugin()
  ]
};

Options

file

Generate manifest json file or not. Default = false

filename

Where the manifest will be exported to on bundle compilation. This will be relative to the main webpack output directory. Default = "manifest.json"

manifestVariable

What JS variable on the client webpack should refer to when requiring chunks. Default = "webpackManifest"

Package Sidebar

Install

npm i chunk-manifest-inject2html-webpack-plugin

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • huaxu