vue.config.js 1020 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. const path = require('path');
  2. const common = path.resolve(__dirname, '../common');
  3. const frame = path.resolve(__dirname, '../frame');
  4. module.exports = {
  5. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  6. outputDir: process.env.VUE_APP_ROUTER,
  7. productionSourceMap: false,
  8. configureWebpack: (config) => {
  9. Object.assign(config, {
  10. resolve: {
  11. alias: {
  12. '@': path.resolve(__dirname, './src'),
  13. '@c': path.resolve(__dirname, './src/components'),
  14. '@a': path.resolve(__dirname, './src/assets'),
  15. '@common': common,
  16. '@frame': frame,
  17. },
  18. },
  19. });
  20. },
  21. devServer: {
  22. port: '8001',
  23. proxy: {
  24. '/files': {
  25. target: 'http://broadcast.kqyjy.com',
  26. },
  27. // '/api/mission': {
  28. // target: 'http://broadcast.waityou24.cn',
  29. // changeOrigin: true,
  30. // ws: false,
  31. // },
  32. '/api': {
  33. target: 'http://broadcast.kqyjy.com',
  34. changeOrigin: true,
  35. ws: false,
  36. },
  37. },
  38. },
  39. };