vue.config.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: '/',
  4. configureWebpack: config => {
  5. Object.assign(config, {
  6. // 开发生产共同配置
  7. resolve: {
  8. alias: {
  9. '@': path.resolve(__dirname, './src'),
  10. '@c': path.resolve(__dirname, './src/components'),
  11. '@a': path.resolve(__dirname, './src/assets'),
  12. },
  13. },
  14. });
  15. },
  16. devServer: {
  17. port: '8001',
  18. //api地址前缀
  19. proxy: {
  20. '/weixin': {
  21. target: 'http://smart.cc-lotus.info',
  22. changeOrigin: true,
  23. ws: true,
  24. },
  25. '/files': {
  26. target: 'http://free.liaoningdoupo.com',
  27. },
  28. '/api/setting': {
  29. target: 'http://free.liaoningdoupo.com', //http://free.liaoningdoupo.com
  30. changeOrigin: true,
  31. ws: true,
  32. },
  33. '/api/affairs': {
  34. target: 'http://free.liaoningdoupo.com',
  35. changeOrigin: true,
  36. ws: true,
  37. },
  38. '/api/policy': {
  39. target: 'http://free.liaoningdoupo.com',
  40. changeOrigin: true,
  41. ws: true,
  42. },
  43. '/api/record': {
  44. target: 'http://free.liaoningdoupo.com',
  45. changeOrigin: true,
  46. ws: true,
  47. },
  48. '/api/serve': {
  49. target: 'http://free.liaoningdoupo.com',
  50. changeOrigin: true,
  51. ws: true,
  52. // pathRewrite: { '^/api/affairs': '/api' },
  53. },
  54. '/api/talent': {
  55. target: 'http://free.liaoningdoupo.com',
  56. changeOrigin: true,
  57. ws: true,
  58. // pathRewrite: { '^/api/affairs': '/api' },
  59. },
  60. '/api/market': {
  61. target: 'http://10.16.10.72:9004',
  62. changeOrigin: true,
  63. ws: true,
  64. // pathRewrite: { '^/api/affairs': '/api' },
  65. },
  66. },
  67. },
  68. };