We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0392906 commit 022758aCopy full SHA for 022758a
packages/router/src/volar/entries/sfc-typed-router.ts
@@ -14,13 +14,13 @@ import type ts from 'typescript'
14
- (low priority) Enhance typing of `to` route in `beforeEnter` route guards defined in `definePage`
15
*/
16
17
-const plugin: VueLanguagePlugin<{ options: { rootDir?: string } }> = ({
+const plugin: VueLanguagePlugin<{ options?: { rootDir?: string } }> = ({
18
compilerOptions,
19
modules: { typescript: ts },
20
config: { options },
21
}) => {
22
// Prioritize plugin options over tsconfig
23
- const rootDir = options.rootDir ?? compilerOptions.rootDir
+ const rootDir = options?.rootDir ?? compilerOptions.rootDir
24
25
// Warn if no rootDir specified
26
if (!rootDir) {
0 commit comments