Skip to content

Commit 9dfcbb3

Browse files
authored
fix(dts-plugin): delete compilerOptions.declarationDir (#4226)
1 parent 443d491 commit 9dfcbb3

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.changeset/nice-news-carry.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): delete compilerOptions.declarationDir

packages/dts-plugin/src/core/configurations/remotePlugin.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ const readTsConfig = (
156156
'references' in rawTsConfigJson && delete rawTsConfigJson.references;
157157

158158
rawTsConfigJson.extends = resolvedTsConfigPath;
159+
if (rawTsConfigJson.compilerOptions.declarationDir) {
160+
delete rawTsConfigJson.compilerOptions.declarationDir;
161+
}
159162
return rawTsConfigJson;
160163
};
161164

packages/dts-plugin/src/core/configurations/tsconfig.test.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"esModuleInterop": true,
88
"strict": true,
99
"strictNullChecks": true,
10-
"resolveJsonModule": true
10+
"resolveJsonModule": true,
11+
"declarationDir": "dts-dist"
1112
}
1213
}

0 commit comments

Comments
 (0)