总结一下html-webpack-plugin插件中常用的配置:
template: '相对路径'
title: '标题'
hash: true
minify: {...}
filename: '生成的文件名'
chunks: [入口文件名]
mpvue 资源路径解析插件 使用示例: const MpvuePlugin = require('webpack-mpvue-asset-plugin') // webpack config { entry: [], output: { path: path.resolve(__dirname, 'dist'), filename: 'foo.bundle.js' }
copy-webpack-plugin 可以将已存在的单个文件或整个目录复制到 Webpack 的构建目录。 首先,需要安装copy-webpack-plugin: npm install copy-webpack-plugin --save-dev 然后将插件添加到webpack配置中: webpack.config.js const CopyPlugin = require("copy-web
HTML Webpack Plugin Plugin that simplifies creation of HTML files to serve your bundles Install Webpack 5 npm i --save-dev html-webpack-plugin yarn add --dev html-webpack-plugin Webpack 4 npm i
Webpack WebExtension Plugin Webpack plugin that compiles web-extension manifest.json files and adds smart auto reload. What does it do? Autoreload extensions via websockets Use vendor prefixes in mani
Note: This only works on Webpack 4, if you're still on Webpack 3 or below please use version 1.x CDN extension for the HTML Webpack Plugin Enhances html-webpack-plugin functionality by allowing you to
特性 简单的与webpack4使用 不需要提供ServiceWorker文件 提供了一个回调API,当webpack的输出文件发生变化时,你可以做一些处理 安装 npm install --save-dev webpack-sw-plugin 执行案例 npm run example 在浏览器内打开localhost:3000 使用教程 快速上手 webpack.config.js const W
babel-plugin-webpack-alias This Babel 6 plugin allows you to use webpack aliases and most of webpack resolve features in Babel. This plugin is simply going to take the aliases defined in your webpack
DEPREACTED due to lack of support/bug fixes/ new features, project abandoned, please migrate on https://github.com/webpack-contrib/terser-webpack-plugin Babel Minify Webpack Plugin A Webpack Plugin fo