vue.config.js 862 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: './',
  4. configureWebpack: {
  5. // 开发生产共同配置
  6. resolve: {
  7. alias: {
  8. '@': path.resolve(__dirname, './src'),
  9. '@c': path.resolve(__dirname, './src/components'),
  10. '@a': path.resolve(__dirname, './src/assets'),
  11. },
  12. },
  13. },
  14. devServer: {
  15. port: '8004',
  16. //api地址前缀
  17. proxy: {
  18. '/api': {
  19. target: 'http://smart.cc-lotus.info',
  20. changeOrigin: true,
  21. ws: true,
  22. },
  23. '/files': {
  24. target: 'http://smart.cc-lotus.info',
  25. changeOrigin: true,
  26. ws: true,
  27. },
  28. '/ws': {
  29. target: 'http://smart.cc-lotus.info',
  30. ws: true,
  31. },
  32. '/weixin': {
  33. target: 'http://smart.cc-lotus.info',
  34. changeOrigin: true,
  35. ws: true,
  36. },
  37. },
  38. },
  39. };