vue.config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: 'http://broadcast.waityou24.cn', // 127.0.0.1:13003
  22. ws: true,
  23. },
  24. '/files': {
  25. target: 'http://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. '/point/group/v1/api': {
  38. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  39. changeOrigin: true,
  40. ws: false,
  41. },
  42. '/dev/point/group/v1/api': {
  43. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  44. changeOrigin: true,
  45. ws: false,
  46. },
  47. '/dev/point/zr/v1/api': {
  48. target: 'https://broadcast.waityou24.cn', // 127.0.0.1:13003
  49. changeOrigin: true,
  50. ws: false,
  51. // pathRewrite: {
  52. // '^/dev/point/zr/v1/api': '/point/zr/v1/api',
  53. // },
  54. },
  55. },
  56. },
  57. };