vue.config.js 854 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. 'use strict'
  2. const path = require('path')
  3. module.exports = {
  4. publicPath: '/',
  5. outputDir: 'dist',
  6. assetsDir: 'static',
  7. lintOnSave: false,
  8. productionSourceMap: false,
  9. devServer: {
  10. port: 8080,
  11. open: true,
  12. proxy: {
  13. '/api': {
  14. target: 'http://localhost:8083',
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^/api': '/api'
  18. }
  19. },
  20. '/producer': {
  21. target: 'http://localhost:8081',
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/producer': '/api'
  25. }
  26. },
  27. '/monitor': {
  28. target: 'http://localhost:8094',
  29. changeOrigin: true,
  30. pathRewrite: {
  31. '^/monitor': '/api/kafka/monitor'
  32. }
  33. }
  34. }
  35. },
  36. configureWebpack: {
  37. resolve: {
  38. alias: {
  39. '@': path.resolve(__dirname, 'src')
  40. }
  41. }
  42. }
  43. }