vue.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  4. // 打包文件
  5. outputDir: 'platlive',
  6. productionSourceMap: false,
  7. configureWebpack: (config) => {
  8. Object.assign(config, {
  9. // 开发生产共同配置
  10. resolve: {
  11. alias: {
  12. '@': path.resolve(__dirname, './src'),
  13. '@c': path.resolve(__dirname, './src/components'),
  14. '@a': path.resolve(__dirname, './src/assets'),
  15. },
  16. },
  17. });
  18. },
  19. devServer: {
  20. port: '11110',
  21. //api地址前缀
  22. proxy: {
  23. '/weixin': {
  24. target: 'http://smart.cc-lotus.info',
  25. changeOrigin: true,
  26. ws: false,
  27. },
  28. '/files': {
  29. target: 'http://broadcast.waityou24.cn',
  30. },
  31. '/api/question': {
  32. target: 'http://broadcast.waityou24.cn', //http://192.168.1.19:9101
  33. changeOrigin: true,
  34. ws: false,
  35. },
  36. '/api': {
  37. target: 'http://192.168.1.19:11111', //http://192.168.1.19:9101
  38. changeOrigin: true,
  39. ws: false,
  40. },
  41. '/site': {
  42. target: 'http://broadcast.waityou24.cn', //http://broadcast.waityou24.cn
  43. changeOrigin: true,
  44. ws: false,
  45. },
  46. '/ws': {
  47. target: 'http://192.168.1.19:15674',
  48. ws: true,
  49. },
  50. },
  51. },
  52. };