|
|
- module.exports = {
- // 基本路径
- publicPath: "./",
- // 构建输出目录
- outputDir: "dist",
- // 静态文件
- assetsDir: "static",
- // html路径
- indexPath: "index.html",
- // 文件名哈希
- filenameHashing: true,
- lintOnSave: true,
- // 请求配置
- devServer: {
- //自动打开浏览器
- port: "8080",
- host: "localhost",
- open: true,
- proxy: {
- "/user": {
- target: process.env.VUE_APP_BASE_URL || 'http://101.201.121.115:8098/', //要跨域的域名 目标地址
- changeOrigin: true, //是否开启跨域 是否更改源路径
- ws: true,
- pathRewrite: {
- "^/user": "", // /api/ / 凡是/api开头的地址都可以跨域
- },
- },
- },
- },
- };
|