1234567891011121314151617181920 |
- const path = require('path');
- const HtmlWebpackPlugin = require('html-webpack-plugin');
- module.exports = {
- entry: {
- index: path.join(__dirname, '../src/main.js'),
- },
- output: {
- filename: '[name].bundle.[chunkhash].js',
- path: path.resolve(__dirname, '../dist'),
- clean: true, // 每一次打包前清空dist文件夹
- },
- plugins: [
- new HtmlWebpackPlugin({
- title: 'Vue App',
- favicon: path.join(__dirname, '../public/favicon.ico'),
- template: path.join(__dirname, '../public/index.html'),
- }),
- ],
- };
|