12345678910111213141516171819202122232425262728293031323334353637 |
- const { defineConfig } = require("@vue/cli-service");
- const path = require("path");
- module.exports = defineConfig({
- transpileDependencies: true,
- lintOnSave: false,
- devServer: {
- client: {
- overlay: false // 编译错误时,取消全屏覆盖(建议关掉)
- },
- // port: 8080,
- // host: "localhost",
- // https: false,
- // open: true,
- proxy: {
- "/admin": {
- target: process.env.VUE_APP_BASE_URL,
- ws: true,
- changeOrigin: true,
- pathRewrite: {
- "^/admin": "/admin"
- }
- },
- "/api": {
- target: 'http://192.168.1.108:8083',
- ws: true,
- changeOrigin: true,
- pathRewrite: {
- "^/api": ""
- }
- }
- }
- },
- chainWebpack: (config) => {
- config.resolve.alias.set("@", path.resolve(__dirname, "src"));
- }
- });
|