refactor(nuxt): opt-in to future jiti.import for schema (#24526)

This commit is contained in:
Daniel Roe 2023-11-29 19:37:34 +01:00 committed by GitHub
parent 228d35bdd5
commit 7664d1d457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',