vue.config.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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', // 127.0.0.1:13003
  22. ws: true,
  23. },
  24. '/files': {
  25. target: 'https://broadcast.waityou24.cn',
  26. },
  27. '/dev/point/v1/api': {
  28. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  29. changeOrigin: true,
  30. ws: false,
  31. },
  32. '/point/v1/api': {
  33. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  34. changeOrigin: true,
  35. ws: false,
  36. },
  37. // 团购
  38. '/point/group/v1/api': {
  39. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  40. changeOrigin: true,
  41. ws: false,
  42. },
  43. '/dev/point/group/v1/api': {
  44. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  45. changeOrigin: true,
  46. ws: false,
  47. },
  48. // 聊天
  49. '/point/chat/v1/api': {
  50. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  51. changeOrigin: true,
  52. ws: false,
  53. },
  54. '/dev/point/chat/v1/api': {
  55. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  56. changeOrigin: true,
  57. ws: false,
  58. },
  59. // 尊荣
  60. '/dev/point/zr/v1/api': {
  61. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  62. changeOrigin: true,
  63. ws: false,
  64. // pathRewrite: {
  65. // '^/dev/point/zr/v1/api': '/point/zr/v1/api',
  66. // },
  67. },
  68. },
  69. },
  70. };