vue.config.js 893 B

123456789101112131415161718192021222324252627282930313233
  1. const path = require('path');
  2. // const proxy_path = 'http://192.168.2.241:88';
  3. // const proxy_path = 'http://173.18.12.195:5050';
  4. const proxy_path = 'http://192.168.65.95:5050'; //沙雅线上地址
  5. // const proxy_path = 'http://192.168.3.117:5050';//周铁刚
  6. // const proxy_path = 'http://192.168.3.113:5050'; //王峰
  7. module.exports = {
  8. lintOnSave: false,
  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. };