0.1.1 • Published 7 years ago
webpack-plugin-chunk-manifest v0.1.1
Introduction
Export a JSON file that maps chunk ids to their resulting asset files. This JSON file could be used for prefetch/preload.
Looking to contribute? Pick up an issue!
Documentation
Installation
yarn add --dev webpack-plugin-chunk-manifest
Usage
// File: webpack.config.js
const ChunkManifest = require('webpack-plugin-chunk-manifest');
module.exports = {
...
plugins: [
new ChunkManifest(),
],
...
}
Options
- filename: Chunk manifest would be stored in this file. Default:
manifest.json
new ChunkManifest({ filename: 'config/manifest.json' })
- transform: Transform chunks before storing.
new ChunkManifest({ tranform (chunks) { // Remove manifest.js from chunks. Object.keys(chunks).forEach(key => { if (/manifest\.js$/.test(chunks[key])) { delete chunks[key] } }) return chunks } })