vue.config.js 793 B

12345678910111213141516171819202122232425262728293031323334353637
  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. css: {
  10. loaderOptions: {
  11. less: {
  12. modifyVars: {
  13. 'primary-color': '#1DA57A',
  14. 'link-color': '#1DA57A',
  15. 'border-radius-base': '2px',
  16. },
  17. javascriptEnabled: true,
  18. }
  19. }
  20. },
  21. devServer: {
  22. proxy: {
  23. '/api': {
  24. target: 'https://www.easy-mock.com/mock/5b7bce071f130e5b7fe8cd7d/antd-pro',
  25. ws: true,
  26. changeOrigin: true
  27. },
  28. '/gateway': {
  29. target: 'https://www.easy-mock.com/mock/5b7bce071f130e5b7fe8cd7d/antd-pro',
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^/gateway': '/api'
  33. }
  34. }
  35. }
  36. }
  37. }