vue.config.js 678 B

1234567891011121314151617181920212223242526272829
  1. const { defineConfig } = require("@vue/cli-service");
  2. const path = require("path");
  3. module.exports = defineConfig({
  4. transpileDependencies: true,
  5. lintOnSave: false,
  6. devServer: {
  7. client: {
  8. overlay: false // 编译错误时,取消全屏覆盖(建议关掉)
  9. },
  10. // port: 8080,
  11. // host: "localhost",
  12. // https: false,
  13. // open: true,
  14. proxy: {
  15. "/admin": {
  16. target: process.env.VUE_APP_BASE_URL,
  17. ws: true,
  18. changeOrigin: true,
  19. pathRewrite: {
  20. "^/admin": "/admin"
  21. }
  22. }
  23. }
  24. },
  25. chainWebpack: (config) => {
  26. config.resolve.alias.set("@", path.resolve(__dirname, "src"));
  27. }
  28. });