We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a2df4f commit 0f4d9e2Copy full SHA for 0f4d9e2
.changeset/ten-apples-kneel.md
@@ -0,0 +1,5 @@
1
+---
2
+'@module-federation/nextjs-mf': patch
3
4
+
5
+Do not crash on share resolver if host is not next
packages/nextjs-mf/src/plugins/container/runtimePlugin.ts
@@ -177,6 +177,11 @@ export default function (): FederationRuntimePlugin {
177
if (!host) {
178
return args;
179
}
180
181
+ if (!host.options.shared[pkgName]) {
182
+ return args;
183
+ }
184
185
args.resolver = function () {
186
shareScopeMap[scope][pkgName][version] =
187
host.options.shared[pkgName][0]; // replace local share scope manually with desired module
0 commit comments