diff --git a/tsconfig.json b/tsconfig.json index 8ff8703..3167d61 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ /** https://cn.vitejs.dev/guide/features.html#typescript-compiler-options */ "useDefineForClassFields": true, "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "bundler", /** TS 严格模式 */ "strict": true, "jsx": "preserve", diff --git a/vite.config.ts b/vite.config.ts index e54c6b7..57b1e9e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -43,7 +43,7 @@ export default (configEnv: ConfigEnv): UserConfigExport => { }, /** 预热常用文件,提高初始页面加载速度 */ warmup: { - clientFiles: ["./src/{views,components}/*.vue"] + clientFiles: ["./src/layouts/**/*.vue"] } }, build: {