vue.config.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. const axios_default_ip =
  2. process.env.NODE_ENV == "dev"
  3. ? "https://zhapi.qingyaokeji.com"//jiufang2.1
  4. // ? "http://192.168.0.139:8017"
  5. : process.env.NODE_ENV == "test-prd"
  6. ? "https://zhapi.qingyaokeji.com" //
  7. : process.env.NODE_ENV == "prd_other"
  8. ? "http://121.37.173.82:82" //贝斯特
  9. : "http://124.71.176.88:882";
  10. //http://hxy_api.qingyaokeji.com // 华信源
  11. // http://124.71.176.88:882 //江山
  12. // 'http://121.41.102.225:82' :测试
  13. // http://124.71.176.88:70 下沙新地址
  14. //http://121.41.102.225:999 上线服务器
  15. process.env.VUE_APP_BASE_URL = axios_default_ip;
  16. module.exports = {
  17. publicPath: "./",
  18. outputDir: "dist",
  19. assetsDir: "static",
  20. indexPath: "index.html",
  21. productionSourceMap: process.env.NODE_ENV === "development",
  22. devServer: {
  23. hot:true,
  24. proxy: {
  25. "/proxy": {
  26. target: axios_default_ip,
  27. ws: true, // proxy websockets
  28. changeOrigin: true,
  29. pathRewrite: {
  30. "^/proxy": "", // rewrite path
  31. },
  32. },
  33. "/postek/print": {
  34. target: "http://192.168.1.110:888",
  35. ws: true, // proxy websockets
  36. changeOrigin: true,
  37. // pathRewrite: {
  38. // '^/postek': '', // rewrite path
  39. // },
  40. },
  41. },
  42. },
  43. lintOnSave: false, //禁用eslint 便于开发
  44. };