{"id":20696,"library":"vuepress-html-webpack-plugin","title":"VuePress HTML Webpack Plugin","description":"A fork of html-webpack-plugin specifically for VuePress to avoid version conflicts when users install incompatible webpack versions alongside VuePress' own. Version 3.2.0 is the latest stable release. This plugin simplifies creation of HTML files to serve webpack bundles, especially useful for hashed filenames. Unlike the original, it is locked to specific webpack internals compatibility for VuePress. No frequent updates.","status":"maintenance","version":"3.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/jantimon/html-webpack-plugin","tags":["javascript","webpack","plugin","html","html-webpack-plugin"],"install":[{"cmd":"npm install vuepress-html-webpack-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add vuepress-html-webpack-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add vuepress-html-webpack-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; version 1, 2, 3, or 4 required","package":"webpack","optional":false}],"imports":[{"note":"CommonJS only; no ESM export at this version","wrong":"import HtmlWebpackPlugin from 'vuepress-html-webpack-plugin'","symbol":"HtmlWebpackPlugin","correct":"const HtmlWebpackPlugin = require('vuepress-html-webpack-plugin')"},{"note":"Default export, not named export","wrong":"const { HtmlWebpackPlugin } = require('vuepress-html-webpack-plugin')","symbol":"HtmlWebpackPlugin","correct":"const HtmlWebpackPlugin = require('vuepress-html-webpack-plugin')"}],"quickstart":{"code":"const HtmlWebpackPlugin = require('vuepress-html-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  entry: 'index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new HtmlWebpackPlugin({\n      title: 'My App',\n      filename: 'index.html'\n    })\n  ]\n};","lang":"javascript","description":"Basic webpack configuration with HtmlWebpackPlugin to generate an HTML file."},"warnings":[{"fix":"Use original html-webpack-plugin for webpack 5, or stay on webpack 4.","message":"This fork locks webpack peer dependency to 1.x-4.x; incompatible with webpack 5.","severity":"breaking","affected_versions":">=3.2.0"},{"fix":"Pin exact webpack version in your project.","message":"Direct requires into webpack internals may break if webpack minor/patch version changes unexpectedly.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Replace require('html-webpack-plugin') with require('vuepress-html-webpack-plugin')","cause":"Wrong package name; should be 'vuepress-html-webpack-plugin' in VuePress context.","error":"Cannot find module 'html-webpack-plugin'"},{"fix":"Ensure webpack version matches peer dependency: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0","cause":"Webpack version mismatch, plugin accesses internal webpack modules.","error":"Module not found: Error: Can't resolve 'webpack/lib/...'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}