From efbce84523a100d65c2088cc5ecf5b1a6e27e338 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 19 Dec 2024 13:15:17 +0000 Subject: [PATCH] fix: parse jsx when importing `sanity.config` --- src/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module.ts b/src/module.ts index 116ae514..10a44f8a 100644 --- a/src/module.ts +++ b/src/module.ts @@ -135,7 +135,7 @@ export default defineNuxtModule({ if (!relativeSanityConfigPath.startsWith('..')) { nuxt.options.watch.push(createRegExp(exactly(relativeSanityConfigPath))) } - const jiti = createJiti(import.meta.url) + const jiti = createJiti(import.meta.url, { jsx: true }) if (existsSync(sanityConfigPath)) { const sanityConfig = await jiti.import(sanityConfigPath, { default: true, try: true }) as { projectId?: string, dataset?: string } if (sanityConfig) {