From 0901a3d1df3c8a239a6f6ab3853f2a03af536e52 Mon Sep 17 00:00:00 2001 From: Stephan Kulla Date: Thu, 7 Dec 2023 11:11:54 +0100 Subject: [PATCH] fix: Proper importing of `defaultImport` --- packages/server/src/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/server/src/utils.ts b/packages/server/src/utils.ts index 810200ae2..0f47e1553 100644 --- a/packages/server/src/utils.ts +++ b/packages/server/src/utils.ts @@ -23,9 +23,8 @@ export async function useDefaultImport(value: A): Promise { // Since `default-import` is a ESM only library do not import it statically // because otherwise we would get an error in CommonJS runtime mode. - const { default: defaultImport } = await import('default-import') + const { defaultImport } = await import('default-import') - // @ts-expect-error The types do not really match with the dynamic import -> // Let's ignore this error for now... return defaultImport(value) as A }