vue.config.js 552 B

12345678910111213141516171819202122232425
  1. // vue.config.js
  2. module.exports = {
  3. pages: {
  4. index: {
  5. entry: 'src/main.js',
  6. chunks: ['chunk-vendors', 'chunk-common', 'index']
  7. }
  8. },
  9. devServer: {
  10. proxy: {
  11. '/api': {
  12. target: 'https://www.easy-mock.com/mock/5b7bce071f130e5b7fe8cd7d/antd-pro',
  13. ws: true,
  14. changeOrigin: true
  15. },
  16. '/gateway': {
  17. target: 'https://www.easy-mock.com/mock/5b7bce071f130e5b7fe8cd7d/antd-pro',
  18. changeOrigin: true,
  19. pathRewrite: {
  20. '^/gateway': '/api'
  21. }
  22. }
  23. }
  24. }
  25. }