vue.config.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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: false,
  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. port: '11201',
  21. proxy: {
  22. '/files': {
  23. target: 'http://127.0.0.1:6100',
  24. },
  25. '/api/position': {
  26. target: 'http://106.12.161.200',
  27. changeOrigin: true,
  28. ws: false,
  29. },
  30. '/api/exam': {
  31. target: 'http://127.0.0.1:6104',
  32. changeOrigin: true,
  33. ws: false,
  34. },
  35. '/api': {
  36. target: 'http://127.0.0.1:6100',
  37. changeOrigin: true,
  38. ws: false,
  39. },
  40. },
  41. },
  42. };