From 7664d1d4579923e6f3eecfe9b475eaf6eeb09d04 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 29 Nov 2023 19:37:34 +0100 Subject: [PATCH] refactor(nuxt): opt-in to future `jiti.import` for schema (#24526) --- packages/nuxt/src/core/schema.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/src/core/schema.ts b/packages/nuxt/src/core/schema.ts index 6e75198ae1..477cc9696c 100644 --- a/packages/nuxt/src/core/schema.ts +++ b/packages/nuxt/src/core/schema.ts @@ -104,7 +104,8 @@ export default defineNuxtModule({ if (filePath && existsSync(filePath)) { let loadedConfig: SchemaDefinition try { - loadedConfig = _resolveSchema(filePath) + // TODO: fix type for second argument of `import` + loadedConfig = await _resolveSchema.import(filePath, {}) as SchemaDefinition } catch (err) { logger.warn( 'Unable to load schema from',