Commit a0021f54 authored by 杨贺晨吉's avatar 杨贺晨吉

feat: 1;

parent f3fbf2ef
......@@ -103,6 +103,7 @@ module.exports = {
publicPath: enableProduction
? '//yun.tuisnake.com/'
: '/',
outputDir: path.resolve(__dirname, 'dist/'),
// 部署优化
configureWebpack: {
// 使用CDN
......@@ -114,6 +115,12 @@ module.exports = {
threshold: 10240 // 对超过10k文件压缩
})
],
output: enableProduction ? {
path: path.resolve(__dirname, 'dist/'),
filename: 'assets/js/[name].[hash].js',
chunkFilename: 'assets/js/[name].[hash].js'
} : {},
optimization: {
runtimeChunk: "single",
minimizer: jsPlugin,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment