Skip to content

Commit

Permalink
fix: parse jsx when importing sanity.config
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 19, 2024
1 parent 59709dc commit efbce84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default defineNuxtModule<SanityModuleOptions>({
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) {
Expand Down

0 comments on commit efbce84

Please sign in to comment.