vue.config.js 982 B

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