快捷酒店,火影风云绝,为什么我家玩cf很卡
html-webpack-plugin可以自动给html添加bundle文件
npm install --save-dev html-webpack-plugin const path = require('path'); + const htmlwebpackplugin = require('html-webpack-plugin'); module.exports = { entry: { app: './src/index.js', print: './src/print.js' }, + plugins: [ + new htmlwebpackplugin({ + title: 'output management' + }) + ], output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist') } };
const path = require('path'); const htmlwebpackplugin = require('html-webpack-plugin'); + const cleanwebpackplugin = require('clean-webpack-plugin'); module.exports = { entry: { app: './src/index.js', print: './src/print.js' }, plugins: [ + new cleanwebpackplugin(['dist']), new htmlwebpackplugin({ title: 'output management' }) ], output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist') } };
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
HTML5 HTMLCollection和NodeList的区别详解
网友评论