From 7fb3c628494c4674385a0e401dcf7fe63972a8fc Mon Sep 17 00:00:00 2001 From: jeffwcx Date: Thu, 13 Jun 2024 19:13:31 +0800 Subject: [PATCH] fix: repository field may be empty --- suites/preset-vue/src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suites/preset-vue/src/common.ts b/suites/preset-vue/src/common.ts index 284f7dc5c..57289b723 100644 --- a/suites/preset-vue/src/common.ts +++ b/suites/preset-vue/src/common.ts @@ -20,7 +20,7 @@ export default (api: IApi) => { const vueConfig = userConfig?.vue; const parserOptions: Partial = { - directory: vueConfig?.directory ?? api.pkg.repository.directory, + directory: vueConfig?.directory ?? api.pkg.repository?.directory, tsconfigPath: vueConfig?.tsconfigPath, checkerOptions: vueConfig?.checkerOptions, };