vue.config.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROOT_URL,
  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. proxy: {
  20. '/files': {
  21. target: 'http://smart.cc-lotus.info',
  22. changeOrigin: true,
  23. ws: true,
  24. },
  25. '/ws': {
  26. target: 'http://smart.cc-lotus.info',
  27. ws: true,
  28. },
  29. '/weixin': {
  30. target: 'http://smart.cc-lotus.info',
  31. changeOrigin: true,
  32. ws: true,
  33. },
  34. // '/api': {
  35. // target: 'http://127.0.0.1:7004',
  36. // changeOrigin: true,
  37. // ws: true,
  38. // },
  39. // '/api': {
  40. // target: 'http://free.liaoningdoupo.com',
  41. // changeOrigin: true,
  42. // ws: true,
  43. // },
  44. '/api': {
  45. target: 'http://124.235.209.122:88',
  46. changeOrigin: true,
  47. ws: true,
  48. },
  49. // '/api': {
  50. // // target: 'http://free.liaoningdoupo.com',
  51. // target: 'https://jlxwjr.jljrkg.com',
  52. // changeOrigin: true,
  53. // ws: true,
  54. // },
  55. },
  56. },
  57. };