{"library":"mini-html-webpack-plugin","title":"mini-html-webpack-plugin","description":"A lightweight alternative to html-webpack-plugin for webpack 4 and 5, automating CSS and JS asset path injection into HTML templates. Current stable version 3.1.3 (October 2020) with no active development since. Supports multi-page setups via chunks, custom template functions, and HTML minification. Unlike html-webpack-plugin, it does not support plugins for html-webpack-plugin, making it simpler but less extensible. Written in TypeScript with bundled type definitions.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install mini-html-webpack-plugin"],"cli":null},"imports":["const { MiniHtmlWebpackPlugin } = require('mini-html-webpack-plugin');","import { generateAttributes } from 'mini-html-webpack-plugin';","import { generateCSSReferences } from 'mini-html-webpack-plugin';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { MiniHtmlWebpackPlugin } = require('mini-html-webpack-plugin');\nconst webpack = require('webpack');\n\nconst compiler = webpack({\n  entry: './index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.js',\n  },\n  plugins: [\n    new MiniHtmlWebpackPlugin({\n      context: { title: 'My App' },\n      chunks: ['main']\n    }),\n  ],\n});\n\ncompiler.run((err, stats) => {\n  if (err) console.error(err);\n  console.log(stats.toString({ colors: true }));\n});","lang":"javascript","description":"Basic setup with MiniHtmlWebpackPlugin: define webpack configuration, add plugin, run compiler.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}