vue.config.js 799 B

123456789101112131415161718192021222324252627282930313233343536
  1. const {
  2. defineConfig
  3. } = require('@vue/cli-service')
  4. module.exports = defineConfig({
  5. transpileDependencies: true,
  6. lintOnSave: false,
  7. //如果是hash模式, publicPath:"";如果是history, publicPath:"/"
  8. publicPath: "/",
  9. //打包的文件夹目录
  10. outputDir: "dist",
  11. // 打包之后的入口文件
  12. indexPath: "index.html",
  13. //静态资源目录
  14. assetsDir: "assets",
  15. //配置代理
  16. devServer: {
  17. proxy: {
  18. '/API': {
  19. target: 'http://192.168.11.112:6202',
  20. ws: false,
  21. changeOrigin: true,
  22. pathRewrite: {
  23. '^/API': ''
  24. }
  25. },
  26. '/APP': {
  27. target: 'https://yunlot.baozhida.cn',
  28. ws: false,
  29. changeOrigin: true,
  30. pathRewrite: {
  31. '^/APP': '/API'
  32. }
  33. }
  34. }
  35. }
  36. })