| | |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | }) |
| | | }); |