Registry / devops / chunk-manifest-webpack-plugin

chunk-manifest-webpack-plugin

JSON →
library1.1.2jsnpmunverified

A Webpack plugin (v1.1.2, final release, no updates since 2017) that exports chunk id to asset file mappings as an external JSON manifest, enabling long-term caching by removing asset hashes from the bootstrap chunk. Key differentiators: earlier alternative to Webpack's built-in runtime chunk extraction; requires manual client-side loading of the manifest JSON; only supports Webpack 2 or 3 and is incompatible with modern Webpack versions (4+).

npm install chunk-manifest-webpack-plugin
INSTALL
IMPORT
SIG · CHUNK-MANIFEST-WEB
C
chunk-manifest-webpack-plugin
devopsjavascriptv1.1.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChunkManifestPlugin
✓ const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');
✗ import ChunkManifestPlugin from 'chunk-manifest-webpack-plugin';
Package does not export ESM; CommonJS only.
default
✓ const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');
✗ const { ChunkManifestPlugin } = require('chunk-manifest-webpack-plugin');
The plugin is exported as a single constructor function, not a named export.
new ChunkManifestPlugin(...)
✓ new ChunkManifestPlugin({ filename: 'manifest.json' })
✗ new ChunkManifestPlugin(filename: 'manifest.json')
Options must be passed as an object argument.

Configures the plugin to output a manifest.json and uses HtmlWebpackPlugin to inject it, with client-side fetch to load the manifest.

// webpack.config.js const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', filename: '[name].[chunkhash].js', chunkFilename: '[name].[chunkhash].js' }, plugins: [ new ChunkManifestPlugin({ filename: 'manifest.json', manifestVariable: 'webpackManifest', inlineManifest: false }), new HtmlWebpackPlugin({ template: 'index.ejs' }) ] }; // index.ejs <script> // Load manifest.json (e.g., via fetch) and assign to window.webpackManifest fetch('/manifest.json') .then(res => res.json()) .then(manifest => { window.webpackManifest = manifest; }); </script>
Debug
Known issues
deprecatedPackage is unmaintained and incompatible with Webpack 4+.
fix
Migrate to Webpack 4+'s built-in runtime chunk extraction or use tools like `webpack-manifest-plugin`.
affects: >=4.0.0
breakingWebpack 3+ changed chunk loading logic; plugin may not work correctly with async chunks.
fix
Test thoroughly with webpack 3; consider alternative plugins.
affects: >=3.0.0
gotchaThe `inlineManifest` option only works when `html-webpack-plugin` is also used.
fix
Install and configure `html-webpack-plugin` if you want inline manifest.
affects: >=0.1.0
Errors
Common errors & fixes
Can't resolve 'chunk-manifest-webpack-plugin'
Package not installed or misspelled.
fix
Run `npm install --save-dev chunk-manifest-webpack-plugin` (note: 'chunk', not 'chunk' typo).
TypeError: ChunkManifestPlugin is not a constructor
Incorrect import style (destructured require).
fix
Use `const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');`
ERROR in chunk manifest not found
Manifest file not loaded/written correctly; plugin ran but output missing.
fix
Ensure `filename` matches the output path and that the file is served.
Upgrade
Version history
1.1.2latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; plugin only works with webpack 2 or 3
Agent activity
15 hits · last 30 days
node
10
Meta
2
Resources
chunk-manifest-webpack-plugin — npm install chunk-manifest-webpack-plugin · libregistry