Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"typescript-eslint": "^8.43.0",
"vite": "catalog:",
"vitest": "^3.2.4",
"vue": "catalog:"
"vue": "https://pkg.pr.new/vue@13926"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false"
Expand Down
19 changes: 19 additions & 0 deletions packages/plugin-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,17 @@ export interface Options {
isProduction: boolean | undefined,
getHash: (text: string) => string,
) => string)

/**
* LRUCache options for the compiler.
* see https://isaacs.github.io/node-lru-cache/
*/
compilerCacheOptions?: {
parse?: Record<string, any>
templateUsageCheck?: Record<string, any>
tsConfig?: Record<string, any>
fileToScope?: Record<string, any>
}
}

/**
Expand Down Expand Up @@ -389,6 +400,14 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin<Api> {
compiler.invalidateTypeCache(file)
})
}

// @ts-expect-error required 3.6+
if (compiler.configureCacheOptions) {
// @ts-expect-error required 3.6+
compiler.configureCacheOptions(
options.value.features?.compilerCacheOptions,
)
}
},

resolveId: {
Expand Down
Loading
Loading