vue.config.js 735 B

1234567891011121314151617181920212223242526272829
  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://coldlogistics.coldbaozhida.com/Cold_Logistic',
  20. target: 'http://coldlogisticstest.coldbaozhida.com/Cold_Logistic', //测试
  21. ws: false,
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/api': ''
  25. }
  26. }
  27. }
  28. }
  29. })