vue.config.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  4. outputDir: process.env.VUE_APP_ROUTER,
  5. productionSourceMap: false,
  6. configureWebpack: (config) => {
  7. Object.assign(config, {
  8. resolve: {
  9. alias: {
  10. '@': path.resolve(__dirname, './src'),
  11. '@c': path.resolve(__dirname, './src/components'),
  12. '@a': path.resolve(__dirname, './src/assets'),
  13. },
  14. },
  15. });
  16. },
  17. devServer: {
  18. port: '9001',
  19. proxy: {
  20. '/ws': {
  21. target: 'https://broadcast.waityou24.cn', // https://broadcast.waityou24.cn
  22. ws: true,
  23. },
  24. '/files': {
  25. target: 'https://broadcast.waityou24.cn',
  26. },
  27. '/dev/point/one/v1/api': {
  28. target: 'http://127.0.0.1:12211', // http://127.0.0.1:12211
  29. changeOrigin: true,
  30. ws: false,
  31. },
  32. '/point/one/v1/api': {
  33. target: 'https://broadcast.waityou24.cn', // http://127.0.0.1:12211
  34. changeOrigin: true,
  35. ws: false,
  36. },
  37. // 团购
  38. '/dev/point/one/group/v1/api': {
  39. target: 'http://127.0.0.1:12213', // http://127.0.0.1:12213
  40. changeOrigin: true,
  41. ws: false,
  42. },
  43. '/point/one/group/v1/api': {
  44. target: 'https://broadcast.waityou24.cn', // http://127.0.0.1:12213
  45. changeOrigin: true,
  46. ws: false,
  47. },
  48. // 聊天
  49. '/dev/point/one/chat/v1/api': {
  50. target: 'http://127.0.0.1:12214', // http://127.0.0.1:12214
  51. changeOrigin: true,
  52. ws: false,
  53. },
  54. '/point/one/chat/v1/api': {
  55. target: 'https://broadcast.waityou24.cn', // http://127.0.0.1:12214
  56. changeOrigin: true,
  57. ws: false,
  58. },
  59. // 尊荣
  60. '/dev/point/one/zr/v1/api': {
  61. target: 'http://127.0.0.1:12212', // http://127.0.0.1:12212
  62. changeOrigin: true,
  63. ws: false,
  64. },
  65. '/point/one/zr/v1/api': {
  66. target: 'https://broadcast.waityou24.cn', // http://127.0.0.1:12212
  67. changeOrigin: true,
  68. ws: false,
  69. },
  70. },
  71. },
  72. };