diff --git a/packages/core/client/src/application/PluginManager.ts b/packages/core/client/src/application/PluginManager.ts index 3e37b466a..de600347c 100644 --- a/packages/core/client/src/application/PluginManager.ts +++ b/packages/core/client/src/application/PluginManager.ts @@ -73,11 +73,11 @@ export class PluginManager { get(PluginClass: T): InstanceType; get(name: string): T; - get(name: any) { - if (typeof name === 'string') { - return this.pluginsAliases[name]; + get(nameOrPluginClass: any) { + if (typeof nameOrPluginClass === 'string') { + return this.pluginsAliases[nameOrPluginClass]; } - return this.pluginInstances.get(name); + return this.pluginInstances.get(nameOrPluginClass.default || nameOrPluginClass); } private getInstance(plugin: typeof Plugin, opts?: T) { diff --git a/packages/core/client/src/application/utils/remotePlugins.ts b/packages/core/client/src/application/utils/remotePlugins.ts index ae2ada08e..877ea8218 100644 --- a/packages/core/client/src/application/utils/remotePlugins.ts +++ b/packages/core/client/src/application/utils/remotePlugins.ts @@ -15,7 +15,7 @@ export function definePluginClient(packageName: string) { value: true, }); Object.keys(_plugin).forEach(function (key) { - if (key === 'default' || key === '__esModule') return; + if (key === '__esModule') return; if (key in _exports && _exports[key] === _plugin[key]) return; Object.defineProperty(_exports, key, { enumerable: true,