Skip to content

Commit 02da18f

Browse files
authored
fix(rspack): do not instantiate DtsPlugin when options.dts = false (#2893)
1 parent fae5a08 commit 02da18f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/rspack/src/ModuleFederationPlugin.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ export class ModuleFederationPlugin implements RspackPluginInstance {
7171

7272
options.implementation = options.implementation || RuntimeToolsPath;
7373
let disableManifest = options.manifest === false;
74+
let disableDts = options.dts === false;
7475

75-
// @ts-ignore
76-
new DtsPlugin(options).apply(compiler);
76+
if (!disableDts) {
77+
// @ts-ignore
78+
new DtsPlugin(options).apply(compiler);
79+
}
7780

7881
if (!disableManifest && options.exposes) {
7982
try {

0 commit comments

Comments
 (0)