vue.config.js 1.2 KB

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