vue.config.js 875 B

1234567891011121314151617181920212223242526272829303132333435
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
  4. // outputDir: process.env.VUE_APP_ROUTER,
  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. },
  14. },
  15. });
  16. },
  17. devServer: {
  18. port: '8001',
  19. //api地址前缀
  20. proxy: {
  21. '/files': {
  22. target: 'http://free.liaoningdoupo.com',
  23. },
  24. '/api': {
  25. target: 'http://192.168.1.91:8090',
  26. changeOrigin: true,
  27. ws: true,
  28. },
  29. '/ws': {
  30. target: 'http://free.liaoningdoupo.com',
  31. ws: true,
  32. },
  33. },
  34. },
  35. };