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.
npm install html-webpack-inline-source-pluginVerified import paths — ran on the pinned version, not inferred.
Basic webpack configuration that inlines all JS and CSS into the HTML file via html-webpack-plugin.
Use html-inline-source-webpack-plugin or inline-source-webpack-plugin for Webpack 5.
Pin html-webpack-plugin to ^3.2.0 or ^4.5.0.
Always instantiate HtmlWebpackInlineSourcePlugin after HtmlWebpackPlugin.
Ensure scripts/styles are directly in template, not added via webpack entry.
npm install html-webpack-inline-source-plugin --save-dev
Use html-webpack-plugin v4 or switch to a Webpack 5 compatible plugin.
Use const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');