vue.config.js 939 B

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