diff --git a/.changeset/weak-baboons-think.md b/.changeset/weak-baboons-think.md new file mode 100644 index 00000000000..d4bd0bb680a --- /dev/null +++ b/.changeset/weak-baboons-think.md @@ -0,0 +1,5 @@ +--- +'@module-federation/nextjs-mf': patch +--- + +fix(nextjs-mf): errorLoadRemote hook not to be overridden diff --git a/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts b/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts index 23f4b490463..39fd87f20b6 100644 --- a/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts +++ b/packages/nextjs-mf/src/plugins/NextFederationPlugin/index.ts @@ -134,9 +134,9 @@ export class NextFederationPlugin { remoteType: 'script', // @ts-ignore runtimePlugins: [ + require.resolve(path.join(__dirname, '../container/runtimePlugin')), //@ts-ignore ...(this._options.runtimePlugins || []), - require.resolve(path.join(__dirname, '../container/runtimePlugin')), ], exposes: { './noop': noop,