vue.config.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. const path = require('path');
  2. const common = path.resolve(__dirname, '../common');
  3. const pics = path.resolve(__dirname, '../common', './src/assets');
  4. module.exports = {
  5. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  6. // 打包文件
  7. outputDir: 'platlive',
  8. productionSourceMap: false,
  9. configureWebpack: config => {
  10. Object.assign(config, {
  11. // 开发生产共同配置
  12. resolve: {
  13. alias: {
  14. '@': path.resolve(__dirname, './src'),
  15. '@c': path.resolve(__dirname, './src/components'),
  16. '@a': path.resolve(__dirname, './src/assets'),
  17. '@common': common,
  18. '@p': pics,
  19. },
  20. },
  21. });
  22. },
  23. devServer: {
  24. port: '8001',
  25. //api地址前缀
  26. proxy: {
  27. '/weixin': {
  28. target: 'http://smart.cc-lotus.info',
  29. changeOrigin: true,
  30. ws: false,
  31. },
  32. '/files': {
  33. target: 'http://broadcast.waityou24.cn',
  34. },
  35. '/api/question': {
  36. target: 'http://broadcast.waityou24.cn', //http://192.168.1.19:9101
  37. changeOrigin: true,
  38. ws: false,
  39. },
  40. '/api': {
  41. target: 'http://broadcast.waityou24.cn', //http://192.168.1.19:9101
  42. changeOrigin: true,
  43. ws: false,
  44. },
  45. '/site': {
  46. target: 'http://broadcast.waityou24.cn', //http://broadcast.waityou24.cn
  47. changeOrigin: true,
  48. ws: false,
  49. },
  50. // '/ws': {
  51. // target: 'http://192.168.1.118',
  52. // ws: false,
  53. // },
  54. },
  55. },
  56. };