vue.config.js 1.2 KB

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