vue.config.js 933 B

123456789101112131415161718192021222324252627282930
  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://192.168.3.100:5050';
  5. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  6. // const proxy_path = 'http://192.168.3.115:5050';
  7. module.exports = {
  8. devServer: {
  9. historyApiFallback: true,
  10. disableHostCheck: true,
  11. proxy: {
  12. '/api': {
  13. target: proxy_path,
  14. changeOrigin: true,
  15. secure: false
  16. }
  17. }
  18. },
  19. configureWebpack:{
  20. resolve:{
  21. alias: {
  22. '@components': path.resolve(__dirname,'./src/components/'),
  23. '@less': path.resolve(__dirname,'./src/less/'),
  24. '@base':path.resolve(__dirname,'./src/components/base/'),
  25. '@api': path.resolve(__dirname,'./src/api/')
  26. }
  27. }
  28. }
  29. };