vue.config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. const axios_default_ip =
  2. process.env.NODE_ENV == 'dev' ?
  3. // 'http://121.41.102.225:82'
  4. "http://121.37.173.82:82":
  5. process.env.NODE_ENV == 'test-prd' ?
  6. 'http://121.41.102.225:82' //测试服
  7. :
  8. process.env.NODE_ENV == 'prd_other' ?
  9. 'http://121.37.173.82:82' //贝斯特
  10. :
  11. 'http://124.71.176.88:82';
  12. // http://124.71.176.88:882 //江山
  13. // 'http://121.41.102.225:82' :测试
  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. };