1 Star 0 Fork 0

lihx/sphui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
lihx 提交于 2022-09-02 23:36 . 尚品汇项目参考
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
transpileDependencies: true,
//直接关闭eslint检查(值可以是布尔值,也可以是waring,官方推荐warning)
// lintOnSave: "warning",
//配置自动打开浏览器方法1:在devServer的配置中配置
devServer: {
//配置项目启动以后自动打开浏览器
open: true,
//如果配置自动打开浏览器,请显式的设置 host地址
host: "127.0.0.1",
//脚手架中默认设置的端口号是8080,我们可以修改端口号
port: 8888,
//第一种配置代理的方式:简单方式:proxy的属性就是目标地址
// proxy: "http://gmall-h5-api.atguigu.cn/",
//第二中配置代理的方式:
proxy: {
"/api1": {
target: "http://gmall-h5-api.atguigu.cn/",
changeOrigin: true,
pathRewrite: {
"^/api1": "",
},
},
},
},
configureWebpack: {
resolve: {
alias: {
"@assets": "@/assets",
"@comp": "@/components",
"@pages": "@/pages",
},
},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lihxin/sphui.git
git@gitee.com:lihxin/sphui.git
lihxin
sphui
sphui
master

搜索帮助