1 Star 0 Fork 1.3K

马小帅 / SCUI

forked from sakuya / SCUI 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
sc 提交于 2021-07-15 14:11 . add proxy
module.exports = {
//设置为空打包后不分更目录还是多级目录
publicPath:'',
//build编译后存放静态文件的目录
//assetsDir: "static",
// build编译后不生成资源MAP文件
productionSourceMap: false,
//开发服务,build后的生产模式还需nginx代理
devServer: {
open: false, //运行后自动打开游览器
port: 2800, //挂载端口
proxy: {
'/api': {
target: 'https://www.fastmock.site/mock/44c807475f7eeba73409792255781935/api',
ws: true,
pathRewrite: {
'^/api': '/'
}
}
}
},
chainWebpack: config => {
// 移除 prefetch 插件
config.plugins.delete('preload');
config.plugins.delete('prefetch');
},
configureWebpack: config => {
//性能提示
config.performance = {
hints: false
}
config.optimization = {
splitChunks: {
chunks: "async",
automaticNameDelimiter: '~',
name: true,
cacheGroups: {
//第三方库抽离
vendor: {
name: "modules",
test: /[\\/]node_modules[\\/]/,
priority: -10
},
tinymce: {
name: "tinymce",
test: /[\\/]node_modules[\\/]tinymce[\\/]/
},
echarts: {
name: "echarts",
test: /[\\/]node_modules[\\/]echarts[\\/]/
}
}
}
}
}
}
JavaScript
1
https://gitee.com/weikety/scui.git
git@gitee.com:weikety/scui.git
weikety
scui
SCUI
master

搜索帮助