vue.config.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. const path = require('path');
  2. const company = path.resolve(__dirname, '../company-cms');
  3. module.exports = {
  4. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROOT_URL,
  5. configureWebpack: config => {
  6. Object.assign(config, {
  7. // 开发生产共同配置
  8. resolve: {
  9. alias: {
  10. '@': path.resolve(__dirname, './src'),
  11. '@c': path.resolve(__dirname, './src/components'),
  12. '@a': path.resolve(__dirname, './src/assets'),
  13. '@company': company,
  14. },
  15. },
  16. });
  17. },
  18. devServer: {
  19. // host: '10.16.4.1',
  20. port: '8001',
  21. //api地址前缀
  22. proxy: {
  23. '/files': {
  24. target: 'http://124.235.209.122:88',
  25. changeOrigin: true,
  26. ws: true,
  27. },
  28. '/ws': {
  29. target: 'http://124.235.209.122:88',
  30. ws: true,
  31. },
  32. '/weixin': {
  33. target: 'http://124.235.209.122:88',
  34. changeOrigin: true,
  35. ws: true,
  36. },
  37. '/api': {
  38. // target: 'http://124.235.209.122:88',
  39. target: 'https://ccss.windd.cn',
  40. changeOrigin: true,
  41. ws: true,
  42. },
  43. },
  44. },
  45. };