Registry / devops / html-webpack-inline-source-plugin

html-webpack-inline-source-plugin

JSON →
library0.0.10jsnpmunverified

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-plugin
INSTALL
IMPORT
SIG · HTML-WEBPACK-INLIN
H
html-webpack-inline-source-plugin
devopsjavascriptv0.0.10
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
import HtmlWebpackInlineSourcePlugin from 'html-webpack-inline-source-plugin';
Does not support ESM imports; only CommonJS works.
HtmlWebpackInlineSourcePlugin
new HtmlWebpackInlineSourcePlugin()
new HtmlWebpackInlineSourcePlugin({ ... }) with unknown options
Plugin constructor accepts no options; all configuration is global.
HtmlWebpackPlugin
const HtmlWebpackPlugin = require('html-webpack-plugin');
import HtmlWebpackPlugin from 'html-webpack-plugin'; in older versions
Must require here too because it's a peer.

Basic webpack configuration that inlines all JS and CSS into the HTML file via html-webpack-plugin.

const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin'); module.exports = { entry: './src/index.js', output: { path: './dist', filename: 'bundle.js' }, plugins: [ new HtmlWebpackPlugin({ inject: true, template: './src/index.html' }), new HtmlWebpackInlineSourcePlugin() ] };
Debug
Known issues
deprecatedPackage is unmaintained since 2020; no support for Webpack 5.
fix
Use html-inline-source-webpack-plugin or inline-source-webpack-plugin for Webpack 5.
affects: >=0.0.10
breakingRequires html-webpack-plugin v3 or v4; incompatible with v5
fix
Pin html-webpack-plugin to ^3.2.0 or ^4.5.0.
affects: >0.0.10
gotchaPlugin must be placed after HtmlWebpackPlugin in plugins array, otherwise no effect.
fix
Always instantiate HtmlWebpackInlineSourcePlugin after HtmlWebpackPlugin.
affects: >=0.0.1
gotchaOnly inlines files that are referenced as <script> or <link> tags in the HTML template; dynamic chunks not inlined.
fix
Ensure scripts/styles are directly in template, not added via webpack entry.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'html-webpack-inline-source-plugin'
Package not installed or version mismatch
fix
npm install html-webpack-inline-source-plugin --save-dev
TypeError: Cannot read property 'hooks' of undefined
Missing or wrong html-webpack-plugin version (v5 incompatible)
fix
Use html-webpack-plugin v4 or switch to a Webpack 5 compatible plugin.
InlineSourcePlugin is not a constructor
CommonJS require used incorrectly (e.g., import instead of require)
fix
Use const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
Upgrade
Version history
0.0.10latest on npm
Audit
Dependencies
html-webpack-pluginrequiredRequired as a peer dependency; this plugin hooks into html-webpack-plugin's hooks.
Agent activity
4 hits · last 30 days
node
4
Resources
html-webpack-inline-source-plugin — npm install html-webpack-inline-source-plugin · libregistry