diff --git a/.changeset/lazy-comics-promise.md b/.changeset/lazy-comics-promise.md new file mode 100644 index 000000000..cbd5bca55 --- /dev/null +++ b/.changeset/lazy-comics-promise.md @@ -0,0 +1,5 @@ +--- +"@callstack/repack": patch +--- + +Fix ScriptManager import path in MF runtime plugins (CorePlugin & ResolverPlugin) diff --git a/packages/repack/src/modules/FederationRuntimePlugins/CorePlugin.ts b/packages/repack/src/modules/FederationRuntimePlugins/CorePlugin.ts index 1ce5c9520..37abd5b5b 100644 --- a/packages/repack/src/modules/FederationRuntimePlugins/CorePlugin.ts +++ b/packages/repack/src/modules/FederationRuntimePlugins/CorePlugin.ts @@ -4,7 +4,7 @@ import type * as RepackClient from '../ScriptManager/index.js'; const RepackCorePlugin: () => FederationRuntimePlugin = () => ({ name: 'repack-core-plugin', loadEntry: async ({ remoteInfo }) => { - const client = require('../ScriptManager.js') as typeof RepackClient; + const client = require('../ScriptManager/index.js') as typeof RepackClient; const { ScriptManager, getWebpackContext } = client; const { entry, entryGlobalName } = remoteInfo; diff --git a/packages/repack/src/modules/FederationRuntimePlugins/ResolverPlugin.ts b/packages/repack/src/modules/FederationRuntimePlugins/ResolverPlugin.ts index 4d52d3111..4158a24cf 100644 --- a/packages/repack/src/modules/FederationRuntimePlugins/ResolverPlugin.ts +++ b/packages/repack/src/modules/FederationRuntimePlugins/ResolverPlugin.ts @@ -25,7 +25,7 @@ const RepackResolverPlugin: ( name: 'repack-resolver-plugin', afterResolve(args) { const { ScriptManager } = - require('../ScriptManager.js') as typeof RepackClient; + require('../ScriptManager/index.js') as typeof RepackClient; const { remoteInfo } = args; ScriptManager.shared.addResolver(