vue.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. :
  7. process.env.NODE_ENV == 'prd_other' ?
  8. 'http://121.37.173.82:82' //贝斯特
  9. :
  10. 'http://124.71.176.88:82';
  11. // http://124.71.176.88:882 //江山
  12. // 'http://121.41.102.225:82' :测试
  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. };