vue.config.js 967 B

12345678910111213141516171819202122232425262728293031323334
  1. const path = require('path');
  2. const proxy_path = 'http://192.168.2.236:80';
  3. // const proxy_path = 'http://192.168.2.236:5050';
  4. // const proxy_path = 'http://192.168.2.241:88';
  5. // const proxy_path = 'http://192.168.2.236:88';
  6. // const proxy_path = 'http://192.168.3.101:5050';
  7. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  8. // const proxy_path = 'http://192.168.3.113:5050'; //王峰
  9. module.exports = {
  10. lintOnSave: false,
  11. devServer: {
  12. historyApiFallback: true,
  13. disableHostCheck: true,
  14. proxy: {
  15. '/api': {
  16. target: proxy_path,
  17. changeOrigin: true,
  18. secure: false,
  19. },
  20. },
  21. },
  22. configureWebpack: {
  23. resolve: {
  24. alias: {
  25. '@components': path.resolve(__dirname, './src/components/'),
  26. '@less': path.resolve(__dirname, './src/less/'),
  27. '@base': path.resolve(__dirname, './src/components/base/'),
  28. '@api': path.resolve(__dirname, './src/api/'),
  29. },
  30. },
  31. },
  32. };