vue.config.js 488 B

12345678910111213141516171819
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. devServer: {
  5. port: 8080,
  6. host:"192.168.0.160", //192.168.0.184
  7. publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
  8. proxy:{
  9. '/api':{
  10. target:"http://192.168.0.160:9090",
  11. changOrigin: true, //允许跨域
  12. pathRewrite:{
  13. '^/api':'' //重写路径
  14. }
  15. }
  16. }
  17. }
  18. })