diff --git a/packages/server/core/src/adapters/node/plugins/resource.ts b/packages/server/core/src/adapters/node/plugins/resource.ts index 79cc7e70d1c..298660258e3 100644 --- a/packages/server/core/src/adapters/node/plugins/resource.ts +++ b/packages/server/core/src/adapters/node/plugins/resource.ts @@ -55,7 +55,12 @@ const dynamicImport = (filePath: string) => { if (module.default) { return Promise.resolve(module.default); } - return Promise.resolve(module); + return Promise.resolve(module).then(m => { + if (m.default) { + return m.default; + } + return m; + }); } catch (e) { return Promise.reject(e); }