4 Star 15 Fork 9

应乘风/education-exam

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.17 KB
一键复制 编辑 原始数据 按行查看 历史
应乘风 提交于 2022-05-20 17:56 +08:00 . 规范名称
const path = require("path");
const resolve = dir => path.join(__dirname, dir);
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
productionSourceMap: false,
outputDir: 'dist', //build输出目录
assetsDir: 'assets', //静态资源目录(js, css, img)
lintOnSave: false, //是否开启eslint
devServer: {
open: true, // 是否打开浏览器
host: "0.0.0.0",
port: "8080", // 端口号默认8080
// https: true, //是否使用https协议
// hotOnly: true, // 热更新
overlay: { // 让浏览器 overlay 同时显示警告和错误
warnings: true,
errors: true
},
proxy: {
[process.env.VUE_APP_API]: {
// target: 'http://localhost:8081/api',
target: process.env.VUE_APP_API_HOST, // 目标代理接口地址
secure: false,
autoRewrite: true,
changeOrigin: false, //是否跨域
// ws: false, // 是否启用websockets
pathRewrite: {
['^' + process.env.VUE_APP_API]: ''
}
}
},
},
// 调整内部的 webpack 配置。
chainWebpack: config => {
config.resolve.alias
.set("@", resolve("src"));
},
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/blackflagisme/education-exam.git
git@gitee.com:blackflagisme/education-exam.git
blackflagisme
education-exam
education-exam
master

搜索帮助