Skip to content

Commit 1e96509

Browse files
authored
fix(dts-plugin): correct generateTypes host params (#4088)
1 parent c171400 commit 1e96509

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/polite-years-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/dts-plugin': patch
3+
---
4+
5+
fix(dts-plugin): correct generateTypes host params

packages/dts-plugin/src/plugins/GenerateTypesPlugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ export const normalizeGenerateTypesOptions = ({
6767
: {
6868
context,
6969
moduleFederationConfig: pluginOptions,
70-
...normalizedGenerateTypes,
70+
...normalizedConsumeTypes,
71+
// generateTypes only use host basic config, eg: typeFolders
72+
remoteTypeUrls:
73+
typeof normalizedConsumeTypes?.remoteTypeUrls === 'object'
74+
? normalizedConsumeTypes?.remoteTypeUrls
75+
: undefined,
7176
},
7277
extraOptions: dtsOptions.extraOptions || {},
7378
displayErrorInTerminal: dtsOptions.displayErrorInTerminal,

0 commit comments

Comments
 (0)