{"id":41296,"library":"inline-chunks-html-webpack-plugin","title":"inline-chunks-html-webpack-plugin","description":"A webpack plugin that inlines specified chunks (e.g., manifest.js, CSS) directly into HTML generated by HtmlWebpackPlugin, reducing HTTP requests. Version 1.3.1 is the latest, with no recent updates; supports webpack 4. Requires HtmlWebpackPlugin v2.10+. Key differentiator: simple configuration for inlining chunks and optionally deleting source files. Does not support webpack 5, which limits adoption compared to alternatives like html-webpack-inline-source-plugin.","status":"maintenance","version":"1.3.1","language":"javascript","source_language":"en","source_url":"https://github.com/Meatloose/inline-chunks-html-webpack-plugin","tags":["javascript"],"install":[{"cmd":"npm install inline-chunks-html-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add inline-chunks-html-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add inline-chunks-html-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin hooks into HtmlWebpackPlugin's events to inline chunks.","package":"html-webpack-plugin","optional":false}],"imports":[{"note":"This package is CommonJS-only; ESM import will fail.","wrong":"import InlineChunksWebpackPlugin from 'inline-chunks-html-webpack-plugin';","symbol":"InlineChunksWebpackPlugin","correct":"const InlineChunksWebpackPlugin = require('inline-chunks-html-webpack-plugin');"}],"quickstart":{"code":"// webpack.config.js\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst InlineChunksWebpackPlugin = require('inline-chunks-html-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: '[name].[chunkhash].js',\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      template: 'src/index.html',\n    }),\n    new InlineChunksWebpackPlugin({\n      inlineChunks: ['runtime'],\n      deleteFile: true,\n    }),\n  ],\n};","lang":"javascript","description":"Shows a minimal webpack 4 config that inlines the 'runtime' chunk into index.html using InlineChunksWebpackPlugin."},"warnings":[{"fix":"Use a webpack 5 compatible plugin like html-webpack-inline-source-plugin or upgrade your webpack config.","message":"Plugin is only compatible with webpack 4; does not work with webpack 5.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure HtmlWebpackPlugin version is at least 2.10.0.","message":"Requires HtmlWebpackPlugin v2.10 or higher; older versions will break.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly set 'deleteFile: true' to remove inlined files, or use CleanWebpackPlugin.","message":"Setting 'deleteFile: false' (default) may leave duplicate chunk files in output if not cleaned up.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Limit inlineChunks to small runtime/manifest chunks to avoid performance issues.","message":"Inlining large chunks can significantly bloat HTML file size; only inline small chunks like manifest.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.3.1':27 '4':37 '5':57 'adopt':60 'altern':63 'chunk':3,13,47 'compar':61 'configur':44 'css':16 'delet':50 'differenti':42 'direct':17 'e.g':14 'file':52 'generat':20 'html':4,19,66 'html-webpack-inline-source-plugin':65 'htmlwebpackplugin':22,39 'http':24 'inlin':2,11,46,68 'inline-chunks-html-webpack-plugin':1 'javascript':71 'key':41 'latest':30 'like':64 'limit':59 'manifest.js':15 'option':49 'plugin':6,9,70 'recent':33 'reduc':23 'request':25 'requir':38 'simpl':43 'sourc':51,69 'specifi':12 'support':35,55 'updat':34 'v2.10':40 'version':26 'webpack':5,8,36,56,67","created_at":"2026-06-04T18:51:43.465118+00:00","updated_at":"2026-06-04T18:51:43.465118+00:00","problems":[{"fix":"Use a webpack 5 compatible alternative or downgrade to webpack 4.","cause":"Plugin uses webpack 4 hooks incompatible with webpack 5.","error":"Error: HookWebpackError: The 'compilation' hook used by InlineChunksWebpackPlugin is not supported by webpack 5."},{"fix":"Install HtmlWebpackPlugin >=2.10.0: npm install html-webpack-plugin@3 --save-dev","cause":"HtmlWebpackPlugin version is too old (pre-2.10) or not installed.","error":"TypeError: Cannot read property 'hooks' of undefined"},{"fix":"Run 'npm install inline-chunks-html-webpack-plugin --save-dev' and use require('inline-chunks-html-webpack-plugin').","cause":"Package not installed or wrong import path.","error":"Module not found: Error: Can't resolve 'inline-chunks-html-webpack-plugin'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Meatloose/inline-chunks-html-webpack-plugin#readme","github":"https://github.com/Meatloose/inline-chunks-html-webpack-plugin","docs":null,"changelog":null,"pypi":null,"npm":"inline-chunks-html-webpack-plugin","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}