vue.config.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. const path = require('path');
  2. // const proxy_path = 'http://192.168.2.236:80';
  3. // const proxy_path = 'http://192.168.2.241:88';
  4. // const proxy_path = 'http://223.93.170.82:23650';
  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.115: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. };