Skip to content

Commit 102e84a

Browse files
fix(rspack): ensure implementation path is defined
1 parent 31925a4 commit 102e84a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/rspack/src/ModuleFederationPlugin.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
136136
}).apply(compiler);
137137
}
138138

139-
options.implementation = options.implementation || RuntimeToolsPath;
139+
const implementationPath = options.implementation || RuntimeToolsPath;
140+
options.implementation = implementationPath;
140141
let disableManifest = options.manifest === false;
141142
let disableDts = options.dts === false;
142143

@@ -166,7 +167,7 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
166167
for (const candidate of candidates) {
167168
try {
168169
return require.resolve(candidate, {
169-
paths: [options.implementation],
170+
paths: [implementationPath],
170171
});
171172
} catch {}
172173
}

0 commit comments

Comments
 (0)