{"id":20141,"library":"inline-source-webpack-plugin","title":"inline-source-webpack-plugin","description":"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/KyLeoHC/inline-source-webpack-plugin","tags":["javascript","webpack","inline","source","css","js","plugin"],"install":[{"cmd":"npm install inline-source-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add inline-source-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add inline-source-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency for HTML processing","package":"html-webpack-plugin","optional":false},{"reason":"Peer dependency; plugin runs in webpack's compilation pipeline","package":"webpack","optional":false}],"imports":[{"note":"CommonJS import is the standard due to Node.js compatibility; no default export in ESM.","symbol":"default","correct":"const InlineSourceWebpackPlugin = require('inline-source-webpack-plugin');"},{"note":"ESM import uses default import. Named import will fail as the plugin is exported as default.","wrong":"import { InlineSourceWebpackPlugin } from 'inline-source-webpack-plugin';","symbol":"default","correct":"import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';"}],"quickstart":{"code":"const HtmlWebpackPlugin = require('html-webpack-plugin');\nconst InlineSourceWebpackPlugin = require('inline-source-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.[contenthash].js'\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      template: './src/index.html'\n    }),\n    new InlineSourceWebpackPlugin({\n      compress: true,\n      rootpath: './src',\n      noAssetMatch: 'warn'\n    })\n  ]\n};","lang":"javascript","description":"Minimal webpack config with HtmlWebpackPlugin and InlineSourceWebpackPlugin, enabling compression and warning on unmatched assets."},"warnings":[{"fix":"Upgrade Node.js to v16 or later.","message":"Node.js version must be >=16.0.0 for v3.x","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade webpack to v5 or use v1.x with webpack 4.","message":"Webpack 5 required for v2.0.0+","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use 'inline-asset' instead of 'inline-bundle' in HTML attributes.","message":"The 'inline-bundle' attribute was renamed to 'inline-asset' in v1.2.0","severity":"deprecated","affected_versions":"<1.2.0"},{"fix":"Ignore warnings in dev mode or set noAssetMatch to 'none' to suppress.","message":"Using 'inline-asset' with a regex may cause 'no asset match' warnings in development mode","severity":"gotcha","affected_versions":">=1.2.0"},{"fix":"Remove src/href and rely solely on inline-asset attribute for webpack-generated assets.","message":"Do not use 'src' or 'href' attributes when using 'inline-asset'; use only 'inline-asset' attribute","severity":"gotcha","affected_versions":">=1.2.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use: import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';","cause":"Incorrect import: using named import instead of default import in ESM","error":"Error: InlineSourceWebpackPlugin is not a constructor"},{"fix":"Install: npm install html-webpack-plugin --save-dev","cause":"Missing peer dependency html-webpack-plugin","error":"Cannot find module 'html-webpack-plugin'"},{"fix":"If using ESM, use default import: import InlineSourceWebpackPlugin from 'inline-source-webpack-plugin';","cause":"Using require() in ESM context without default export","error":"Error: InlineSourceWebpackPlugin is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}