96 Star 350 Fork 174

Exrick / xboot-front

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
Exrick 提交于 2021-07-02 01:09 . [UPDATE]3.3.4
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',
// 'view-design': 'iview',
// echarts: 'echarts',
// apexcharts: 'ApexCharts',
// 'vue-apexcharts': 'VueApexCharts',
// dplayer: 'DPlayer',
// 'print-js': 'printJS',
// html2canvas: 'html2canvas',
// 'vue-json-pretty': 'VueJsonPretty',
// 'vue-lazyload': 'VueLazyload',
// 'js-cookie': 'Cookies',
// vuedraggable: 'vuedraggable',
// viewerjs: 'Viewer'
// },
// GZIP压缩
plugins: [
new CompressionPlugin({
test: /\.js$|\.html$|\.css/, // 匹配文件
threshold: 10240 // 对超过10k文件压缩
})
]
}
}
JavaScript
1
https://gitee.com/Exrick/xboot-front.git
git@gitee.com:Exrick/xboot-front.git
Exrick
xboot-front
xboot-front
master

搜索帮助