vue.config.js 1.1 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://121.41.102.225: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. process.env.VUE_APP_BASE_URL = axios_default_ip;
  12. module.exports = {
  13. publicPath: "./",
  14. outputDir: "dist",
  15. assetsDir: "static",
  16. indexPath: "index.html",
  17. productionSourceMap: process.env.NODE_ENV === "development",
  18. devServer: {
  19. proxy: {
  20. "/proxy": {
  21. target: axios_default_ip,
  22. ws: true, // proxy websockets
  23. changeOrigin: true,
  24. pathRewrite: {
  25. "^/proxy": "", // rewrite path
  26. },
  27. },
  28. "/postek/print": {
  29. target: "http://192.168.1.110:888",
  30. ws: true, // proxy websockets
  31. changeOrigin: true,
  32. // pathRewrite: {
  33. // '^/postek': '', // rewrite path
  34. // },
  35. },
  36. },
  37. },
  38. lintOnSave: false, //禁用eslint 便于开发
  39. };