vue.config.js 758 B

12345678910111213141516171819202122232425262728293031323334
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: '/',
  4. // pages: {
  5. // index: 'src/pages/login/main.js',
  6. // },
  7. configureWebpack: config => {
  8. Object.assign(config, {
  9. // 开发生产共同配置
  10. resolve: {
  11. alias: {
  12. '@': path.resolve(__dirname, './src'),
  13. '@c': path.resolve(__dirname, './src/components'),
  14. '@a': path.resolve(__dirname, './src/assets'),
  15. },
  16. },
  17. });
  18. },
  19. devServer: {
  20. port: '8001',
  21. //api地址前缀
  22. proxy: {
  23. '/admin': {
  24. target: 'http://10.16.11.186:80', //10.16.11.186:80 10.16.11.227:7001
  25. changeOrigin: true,
  26. ws: false,
  27. // pathRewrite: {
  28. // '/': '',
  29. // },
  30. },
  31. },
  32. },
  33. };