2 Star 18 Fork 5

趁雨行 / 懒人记账-前端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
趁雨行 提交于 2021-06-04 16:20 . 打包压缩 + cdn引入部分组件
const compressionPlugin = require('compression-webpack-plugin')
module.exports = {
css: {
requireModuleExtension: true
},
devServer: {
port: 8889
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = '懒得记账'
return args
})
},
pwa: {
iconPaths: {
favicon32: 'favicon.ico',
favicon16: 'favicon.ico',
appleTouchIcon: 'favicon.ico',
maskIcon: 'favicon.ico',
msTileImage: 'favicon.ico'
}
},
// eslint-disable-next-line no-unused-vars
configureWebpack: config => {
return {
plugins: [
new compressionPlugin({
algorithm: 'gzip',
test: /\.js$|\.html$|\.css/,
threshold: 10240,
deleteOriginalAssets: false
})
],
externals:{//排除一些引入的模块,不进行打包
'vue':'Vue',
'axios':'axios',
'vue-router': 'VueRouter',
'echarts': 'echarts'
}
}
}
}
JavaScript
1
https://gitee.com/cyh724/bill-frontend.git
git@gitee.com:cyh724/bill-frontend.git
cyh724
bill-frontend
懒人记账-前端
master

搜索帮助