vue.config.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. const path = require('path');
  2. const common = path.resolve(__dirname, '../baoan-common');
  3. module.exports = {
  4. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  5. outputDir: process.env.VUE_APP_ROUTER,
  6. productionSourceMap: true,
  7. configureWebpack: (config) => {
  8. Object.assign(config, {
  9. resolve: {
  10. alias: {
  11. '@': path.resolve(__dirname, './src'),
  12. '@c': path.resolve(__dirname, './src/components'),
  13. '@a': path.resolve(__dirname, './src/assets'),
  14. '@common': common,
  15. },
  16. },
  17. });
  18. },
  19. devServer: {
  20. open: true,
  21. port: '11201',
  22. proxy: {
  23. '/files': {
  24. target: 'http://baoan.fwedzgc.com:8090',
  25. },
  26. '/api/wx': {
  27. target: 'http://baoan.fwedzgc.com:8090',
  28. changeOrigin: true,
  29. ws: false,
  30. },
  31. '/api/position': {
  32. target: 'http://baoan.fwedzgc.com:8090',
  33. changeOrigin: true,
  34. ws: false,
  35. },
  36. '/apigpy': {
  37. target: 'http://127.0.0.1:38088',
  38. changeOrigin: true,
  39. ws: false,
  40. },
  41. '/api/usual/sendMessage': {
  42. target: 'http://baoan.fwedzgc.com:8090', // http://106.12.161.200:6100
  43. changeOrigin: true,
  44. ws: false,
  45. },
  46. '/api': {
  47. target: 'http://baoan.fwedzgc.com:8090', // http://106.12.161.200:6100
  48. changeOrigin: true,
  49. ws: false,
  50. },
  51. // '/bio': {
  52. // target: 'http://localhost:13211',
  53. // changeOrigin: true,
  54. // ws: false,
  55. // },
  56. // '/bio': {
  57. // target: 'http://127.0.0.1:13212',
  58. // changeOrigin: true,
  59. // ws: false,
  60. // },
  61. },
  62. },
  63. };