vue.config.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const axios_default_ip =
  2. process.env.NODE_ENV == "dev"
  3. ? "http://121.41.102.225:82"
  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://124.71.176.88:882 //江山
  10. // 'http://121.41.102.225:82' :测试
  11. // http://124.71.176.88:70 江山新地址
  12. process.env.VUE_APP_BASE_URL = axios_default_ip;
  13. module.exports = {
  14. publicPath: "./",
  15. outputDir: "dist",
  16. assetsDir: "static",
  17. indexPath: "index.html",
  18. productionSourceMap: process.env.NODE_ENV === "development",
  19. devServer: {
  20. proxy: {
  21. "/proxy": {
  22. target: axios_default_ip,
  23. ws: true, // proxy websockets
  24. changeOrigin: true,
  25. pathRewrite: {
  26. "^/proxy": "", // rewrite path
  27. },
  28. },
  29. "/postek/print": {
  30. target: "http://192.168.1.110:888",
  31. ws: true, // proxy websockets
  32. changeOrigin: true,
  33. // pathRewrite: {
  34. // '^/postek': '', // rewrite path
  35. // },
  36. },
  37. },
  38. },
  39. lintOnSave: false, //禁用eslint 便于开发
  40. };