Skip to content

Commit

Permalink
fix(dts-plugin): overwriting a directory with types on hot updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lozunoff committed Jan 8, 2025
1 parent 1f82d59 commit e52cb02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-ligers-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/dts-plugin': minor
---

fixed overwriting a directory with types on hot updates
2 changes: 2 additions & 0 deletions packages/dts-plugin/src/plugins/GenerateTypesPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {
await new Promise<void>((resolve, reject) => {
compiler.outputFileSystem.mkdir(
path.dirname(zipOutputPath),
{ recursive: true },
(err) => {
if (err) reject(err);
else {
Expand Down Expand Up @@ -138,6 +139,7 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {
await new Promise<void>((resolve, reject) => {
compiler.outputFileSystem.mkdir(
path.dirname(apiOutputPath),
{ recursive: true },
(err) => {
if (err) reject(err);
else {
Expand Down

0 comments on commit e52cb02

Please sign in to comment.