Registry / devops / inline-source-webpack-plugin

inline-source-webpack-plugin

JSON →
library3.0.1jsnpmunverified

A webpack plugin to embed CSS/JS resources inline into HTML output using inline-source, requiring html-webpack-plugin. Version 3.0.1 supports webpack 5 and Node >=16. Minimal configuration needed; supports compression, custom root paths, and regex-based asset matching. Differentiators: tight integration with html-webpack-plugin, support for inline-asset attributes, and no-asset-match handling.

npm install inline-source-webpack-plugin
INSTALL
IMPORT
SIG · INLINE-SOURCE-WEBP
I
inline-source-webpack-plugin
devopsjavascriptv3.0.1
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 InlineSourceWebpackPlugin = require('inline-source-webpack-plugin');
CommonJS import is the standard due to Node.js compatibility; no default export in ESM.
default
import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';
import { InlineSourceWebpackPlugin } from 'inline-source-webpack-plugin';
ESM import uses default import. Named import will fail as the plugin is exported as default.

Minimal webpack config with HtmlWebpackPlugin and InlineSourceWebpackPlugin, enabling compression and warning on unmatched assets.

const HtmlWebpackPlugin = require('html-webpack-plugin'); const InlineSourceWebpackPlugin = require('inline-source-webpack-plugin'); module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.[contenthash].js' }, plugins: [ new HtmlWebpackPlugin({ template: './src/index.html' }), new InlineSourceWebpackPlugin({ compress: true, rootpath: './src', noAssetMatch: 'warn' }) ] };
Debug
Known issues
breakingNode.js version must be >=16.0.0 for v3.x
fix
Upgrade Node.js to v16 or later.
affects: >=3.0.0
breakingWebpack 5 required for v2.0.0+
fix
Upgrade webpack to v5 or use v1.x with webpack 4.
affects: >=2.0.0
deprecatedThe 'inline-bundle' attribute was renamed to 'inline-asset' in v1.2.0
fix
Use 'inline-asset' instead of 'inline-bundle' in HTML attributes.
affects: <1.2.0
gotchaUsing 'inline-asset' with a regex may cause 'no asset match' warnings in development mode
fix
Ignore warnings in dev mode or set noAssetMatch to 'none' to suppress.
affects: >=1.2.0
gotchaDo not use 'src' or 'href' attributes when using 'inline-asset'; use only 'inline-asset' attribute
fix
Remove src/href and rely solely on inline-asset attribute for webpack-generated assets.
affects: >=1.2.0
Errors
Common errors & fixes
Error: InlineSourceWebpackPlugin is not a constructor
Incorrect import: using named import instead of default import in ESM
fix
Use: import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';
Cannot find module 'html-webpack-plugin'
Missing peer dependency html-webpack-plugin
fix
Install: npm install html-webpack-plugin --save-dev
Error: InlineSourceWebpackPlugin is not a constructor
Using require() in ESM context without default export
fix
If using ESM, use default import: import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
html-webpack-pluginrequiredRequired as a peer dependency for HTML processing
webpackrequiredPeer dependency; plugin runs in webpack's compilation pipeline
Agent activity
4 hits · last 30 days
node
4
Resources
inline-source-webpack-plugin — npm install inline-source-webpack-plugin · libregistry