Skip to content

Commit e2c0a89

Browse files
authored
fix(dts-plugin): add recursive:true while generate types hit cache (#3640)
1 parent e5fae18 commit e2c0a89

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changeset/tame-mangos-wash.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): add recursive:true while generate types hit cache

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {
207207
await new Promise<void>((resolve, reject) => {
208208
compiler.outputFileSystem.mkdir(
209209
path.dirname(zipOutputPath),
210+
{
211+
recursive: true,
212+
},
213+
// @ts-ignore type fixed in https://github.com/webpack/webpack/releases/tag/v5.91.0
210214
(err) => {
211215
if (err && !isEEXIST(err)) {
212216
reject(err);
@@ -239,6 +243,10 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {
239243
await new Promise<void>((resolve, reject) => {
240244
compiler.outputFileSystem.mkdir(
241245
path.dirname(apiOutputPath),
246+
{
247+
recursive: true,
248+
},
249+
// @ts-ignore type fixed in https://github.com/webpack/webpack/releases/tag/v5.91.0
242250
(err) => {
243251
if (err && !isEEXIST(err)) {
244252
reject(err);

0 commit comments

Comments
 (0)