{"id":20108,"library":"html-webpack-inline-source-plugin","title":"html-webpack-inline-source-plugin","description":"Webpack plugin (v0.0.10) that inlines JavaScript and CSS source into HTML output when using webpack-dev-server or middleware. Integrates with html-webpack-plugin to replace external script/style tags with inline content. Primarily used for performance optimization in development, but also works in production builds. Requires html-webpack-plugin and must be placed after it in plugins array. No active maintenance since 2020.","status":"deprecated","version":"0.0.10","language":"javascript","source_language":"en","source_url":"https://github.com/dustinjackson/html-webpack-inline-source-plugin","tags":["javascript","webpack","plugin","html-webpack-plugin","inline","source"],"install":[{"cmd":"npm install html-webpack-inline-source-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add html-webpack-inline-source-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add html-webpack-inline-source-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency; this plugin hooks into html-webpack-plugin's hooks.","package":"html-webpack-plugin","optional":false}],"imports":[{"note":"Does not support ESM imports; only CommonJS works.","wrong":"import HtmlWebpackInlineSourcePlugin from 'html-webpack-inline-source-plugin';","symbol":"default","correct":"const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');"},{"note":"Plugin constructor accepts no options; all configuration is global.","wrong":"new HtmlWebpackInlineSourcePlugin({ ... }) with unknown options","symbol":"HtmlWebpackInlineSourcePlugin","correct":"new HtmlWebpackInlineSourcePlugin()"},{"note":"Must require here too because it's a peer.","wrong":"import HtmlWebpackPlugin from 'html-webpack-plugin'; in older versions","symbol":"HtmlWebpackPlugin","correct":"const HtmlWebpackPlugin = require('html-webpack-plugin');"}],"quickstart":{"code":"const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: { path: './dist', filename: 'bundle.js' },\n  plugins: [\n    new HtmlWebpackPlugin({\n      inject: true,\n      template: './src/index.html'\n    }),\n    new HtmlWebpackInlineSourcePlugin()\n  ]\n};","lang":"javascript","description":"Basic webpack configuration that inlines all JS and CSS into the HTML file via html-webpack-plugin."},"warnings":[{"fix":"Use html-inline-source-webpack-plugin or inline-source-webpack-plugin for Webpack 5.","message":"Package is unmaintained since 2020; no support for Webpack 5.","severity":"deprecated","affected_versions":">=0.0.10"},{"fix":"Pin html-webpack-plugin to ^3.2.0 or ^4.5.0.","message":"Requires html-webpack-plugin v3 or v4; incompatible with v5","severity":"breaking","affected_versions":">0.0.10"},{"fix":"Always instantiate HtmlWebpackInlineSourcePlugin after HtmlWebpackPlugin.","message":"Plugin must be placed after HtmlWebpackPlugin in plugins array, otherwise no effect.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Ensure scripts/styles are directly in template, not added via webpack entry.","message":"Only inlines files that are referenced as <script> or <link> tags in the HTML template; dynamic chunks not inlined.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install html-webpack-inline-source-plugin --save-dev","cause":"Package not installed or version mismatch","error":"Error: Cannot find module 'html-webpack-inline-source-plugin'"},{"fix":"Use html-webpack-plugin v4 or switch to a Webpack 5 compatible plugin.","cause":"Missing or wrong html-webpack-plugin version (v5 incompatible)","error":"TypeError: Cannot read property 'hooks' of undefined"},{"fix":"Use const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');","cause":"CommonJS require used incorrectly (e.g., import instead of require)","error":"InlineSourcePlugin is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}