vue.config.js 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
  4. outputDir: 'mobile',
  5. configureWebpack: {
  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. devServer: {
  16. port: '9009',
  17. //api地址前缀
  18. proxy: {
  19. '/api': {
  20. target: 'http://broadcast.waityou24.cn', //http://10.4.61.155:8888
  21. ws: false,
  22. },
  23. '/files': {
  24. target: 'http://broadcast.waityou24.cn',
  25. ws: false,
  26. },
  27. '/ws': {
  28. target: 'http://broadcast.waityou24.cn',
  29. ws: false,
  30. },
  31. '/weixin': {
  32. target: 'http://wx.cc-lotus.info',
  33. changeOrigin: true,
  34. ws: false,
  35. pathRewrite: {
  36. '^/weixin': '/api',
  37. },
  38. },
  39. },
  40. },
  41. };