ETCD 前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
734 B

3 years ago
  1. module.exports = {
  2. // 基本路径
  3. publicPath: "./",
  4. // 构建输出目录
  5. outputDir: "dist",
  6. // 静态文件
  7. assetsDir: "static",
  8. // html路径
  9. indexPath: "index.html",
  10. // 文件名哈希
  11. filenameHashing: true,
  12. lintOnSave: true,
  13. // 请求配置
  14. devServer: {
  15. //自动打开浏览器
  16. port: "8080",
  17. host: "localhost",
  18. open: true,
  19. proxy: {
  20. "/user": {
  21. target: process.env.VUE_APP_BASE_URL || 'http://101.201.121.115:8098/', //要跨域的域名 目标地址
  22. changeOrigin: true, //是否开启跨域 是否更改源路径
  23. ws: true,
  24. pathRewrite: {
  25. "^/user": "", // /api/ / 凡是/api开头的地址都可以跨域
  26. },
  27. },
  28. },
  29. },
  30. };