wangyawei
2025-04-18 94cfc15f29212c722f294b6b90c88dbb4197a496
vue.config.js
@@ -1,13 +1,41 @@
const { defineConfig } = require('@vue/cli-service');
const path = require("path");
const path = require('path');
module.exports = defineConfig({
  runtimeCompiler: false,     //新增
  productionSourceMap: false, //新增
  transpileDependencies: true,
  configureWebpack: {
    resolve: {
      alias: {
        "@": path.resolve("src")
        '@': path.resolve(__dirname, 'src')
      }
    }
  },
  //新增
  devServer: {
    port: 8080,
    open: true,
    host: '0.0.0.0',
    https: false,
    hot: true,
    proxy: {
      '/api': {
        target: 'http://192.168.56.107:8078',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        },
        secure: false
      },
      '/hp': {
        target: 'http://192.168.56.106:9511',
        changeOrigin: true,
        pathRewrite: {
          '^/hp': ''
        },
        secure: false
      }
    }
  }
})
});