vue.config.js 761 B

123456789101112131415161718192021222324252627282930
  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. }
  29. }
  30. })