{"id":19403,"library":"chunk-manifest-webpack-plugin","title":"Chunk Manifest Webpack Plugin","description":"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+).","status":"deprecated","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/soundcloud/chunk-manifest-webpack-plugin","tags":["javascript","webpack","chunk","manifest","plugin"],"install":[{"cmd":"npm install chunk-manifest-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add chunk-manifest-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add chunk-manifest-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin only works with webpack 2 or 3","package":"webpack","optional":false}],"imports":[{"note":"Package does not export ESM; CommonJS only.","wrong":"import ChunkManifestPlugin from 'chunk-manifest-webpack-plugin';","symbol":"ChunkManifestPlugin","correct":"const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');"},{"note":"The plugin is exported as a single constructor function, not a named export.","wrong":"const { ChunkManifestPlugin } = require('chunk-manifest-webpack-plugin');","symbol":"default","correct":"const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');"},{"note":"Options must be passed as an object argument.","wrong":"new ChunkManifestPlugin(filename: 'manifest.json')","symbol":"new ChunkManifestPlugin(...)","correct":"new ChunkManifestPlugin({ filename: 'manifest.json' })"}],"quickstart":{"code":"// webpack.config.js\nconst ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: '[name].[chunkhash].js',\n    chunkFilename: '[name].[chunkhash].js'\n  },\n  plugins: [\n    new ChunkManifestPlugin({\n      filename: 'manifest.json',\n      manifestVariable: 'webpackManifest',\n      inlineManifest: false\n    }),\n    new HtmlWebpackPlugin({\n      template: 'index.ejs'\n    })\n  ]\n};\n\n// index.ejs\n<script>\n  // Load manifest.json (e.g., via fetch) and assign to window.webpackManifest\n  fetch('/manifest.json')\n    .then(res => res.json())\n    .then(manifest => { window.webpackManifest = manifest; });\n</script>","lang":"javascript","description":"Configures the plugin to output a manifest.json and uses HtmlWebpackPlugin to inject it, with client-side fetch to load the manifest."},"warnings":[{"fix":"Migrate to Webpack 4+'s built-in runtime chunk extraction or use tools like `webpack-manifest-plugin`.","message":"Package is unmaintained and incompatible with Webpack 4+.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Test thoroughly with webpack 3; consider alternative plugins.","message":"Webpack 3+ changed chunk loading logic; plugin may not work correctly with async chunks.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Install and configure `html-webpack-plugin` if you want inline manifest.","message":"The `inlineManifest` option only works when `html-webpack-plugin` is also used.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev chunk-manifest-webpack-plugin` (note: 'chunk', not 'chunk' typo).","cause":"Package not installed or misspelled.","error":"Can't resolve 'chunk-manifest-webpack-plugin'"},{"fix":"Use `const ChunkManifestPlugin = require('chunk-manifest-webpack-plugin');`","cause":"Incorrect import style (destructured require).","error":"TypeError: ChunkManifestPlugin is not a constructor"},{"fix":"Ensure `filename` matches the output path and that the file is served.","cause":"Manifest file not loaded/written correctly; plugin ran but output missing.","error":"ERROR in chunk manifest not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}