This commit is contained in:
2021-10-29 14:29:56 +08:00
parent 03043f1c6d
commit a406049ee6
7 changed files with 23 additions and 6 deletions

View File

@@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-10-11 16:38:28
* @LastEditors: zwq
* @LastEditTime: 2021-10-29 09:11:29
* @Description:
*/
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
@@ -54,6 +61,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
favicon: path.resolve('./src/assets/logo.png'),
template: 'index.html',
inject: true
}),

View File

@@ -46,7 +46,7 @@ const webpackConfig = merge(baseWebpackConfig, {
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
@@ -63,6 +63,7 @@ const webpackConfig = merge(baseWebpackConfig, {
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
favicon: path.resolve('./src/assets/logo.png'),
inject: true,
minify: {
removeComments: true,