From 10562a6dac1492fe3dda566a800a4fec1f6e3bca Mon Sep 17 00:00:00 2001 From: gaosp <gaosp> Date: 星期日, 14 一月 2024 15:09:34 +0800 Subject: [PATCH] Merge branch 'master' of http://www.beijingsoft.cn:9090/r/mdc-front --- build/webpack.prod.conf.js | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index e138de6..8bb7381 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -29,7 +29,8 @@ output: { path: config.build.assetsRoot, filename: utils.assetsPath('js/[name].[chunkhash].js'), - chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') + chunkFilename: utils.assetsPath('js/[id].[chunkhash].js'), + publicPath: './' }, plugins: [ // http://vuejs.github.io/vue-loader/en/workflow/production.html @@ -67,8 +68,26 @@ filename: config.build.index, template: 'index.html', inject: true, - favicon: resolve('favicon.ico'), + // favicon: resolve('favicon.ico'), title: 'mdc-portal', + chunks: ['manifest', 'vendor', 'app'], + minify: { + removeComments: true, + collapseWhitespace: true, + removeAttributeQuotes: true + // more options: + // https://github.com/kangax/html-minifier#options-quick-reference + }, + // necessary to consistently work with multiple chunks via CommonsChunkPlugin + chunksSortMode: 'dependency' + }), + new HtmlWebpackPlugin({ + filename: config.build.test, + template: 'index.html', + inject: true, + // favicon: resolve('favicon.ico'), + title: 'mdc-portal', + chunks: ['manifest', 'vendor', 'test'], minify: { removeComments: true, collapseWhitespace: true, -- Gitblit v1.9.3