vue.config.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
  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. //10.16.11.196:80
  20. proxy: {
  21. '/api/zhwl': {
  22. target: 'http://localhost:8080', //http://free.liaoningdoupo.com
  23. changeOrigin: true,
  24. ws: true,
  25. },
  26. '/files': {
  27. target: 'http://free.liaoningdoupo.com',
  28. changeOrigin: true,
  29. ws: true,
  30. },
  31. '/ws': {
  32. target: 'http://free.liaoningdoupo.com',
  33. ws: true,
  34. },
  35. '/weixin': {
  36. target: 'http://smart.cc-lotus.info',
  37. changeOrigin: true,
  38. ws: true,
  39. },
  40. },
  41. },
  42. };