1 Star 0 Fork 175

铜绿/xboot-front

forked from Exrick/xboot-front 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
Exrick 提交于 2019-10-24 00:51 . [UPDATE]大量优化代码
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
devServer: {
host: '127.0.0.1',
port: 9999,
proxy: {
'/xboot': {
target: 'http://127.0.0.1:8888', // 请求本地 需要xboot后台项目
ws: true
},
'/foo': {
target: '<other_url>'
}
}
},
// 打包时不生成.map文件 避免看到源码
productionSourceMap: false,
// 部署优化
configureWebpack: {
// 使用CDN
// externals: {
// vue: 'Vue',
// 'vue-i18n': 'VueI18n',
// axios: 'axios',
// 'vue-router': 'VueRouter',
// vuex: 'Vuex',
// iview: 'iview',
// echarts: 'echarts',
// apexcharts: 'ApexCharts',
// 'vue-apexcharts': 'VueApexCharts',
// xlsx: 'XLSX',
// dplayer: 'DPlayer',
// gitalk: 'Gitalk',
// 'js-cookie': 'Cookies',
// wangEditor: 'wangEditor'
// },
// GZIP压缩
plugins: [
new CompressionPlugin({
test: /\.js$|\.html$|\.css/, // 匹配文件
threshold: 10240 // 对超过10k文件压缩
})
]
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/greenpatina/xboot-front.git
git@gitee.com:greenpatina/xboot-front.git
greenpatina
xboot-front
xboot-front
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385