vue.config.js 1022 B

123456789101112131415161718192021222324252627282930313233343536373839
  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: process.env.VUE_APP_BASE_API,
  20. // target: 'https://colddelivery.coldbaozhida.com/cold_delivery',
  21. target: 'http://colddeliverytest.coldbaozhida.com:9090/cold_delivery', //测试
  22. // target: 'http://192.168.11.49:6280', //本地
  23. ws: false,
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^/api': ''
  27. }
  28. },
  29. '/APP': {
  30. target: 'https://public.coldbaozhida.com',
  31. ws: false,
  32. changeOrigin: true,
  33. pathRewrite: {
  34. '^/APP': ''
  35. }
  36. }
  37. }
  38. }
  39. })