vue.config.js 1.1 KB

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