From 17da91a55814b98e9bd99e14537a27f58eda5aa1 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 28 Aug 2022 00:27:20 -0400 Subject: [PATCH] *Importing a plugin may be ESM and so check for the default property --- src/plugin.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugin.ts b/src/plugin.ts index a19418b..2548756 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -39,6 +39,9 @@ export class PluginApiManager { } catch (e) { throw e; } + if ("default" in plugin) { + plugin = plugin?.default as Plugin; + } plugin.name = sanitizeName(plugin.name);