Skip to content

Commit b4c9a96

Browse files
committed
fix: workaround broken fs types
1 parent 5714792 commit b4c9a96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

api/test/tree-shaking/tree-shaking.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,10 @@ describe('tree-shaking', () => {
8888
const fs = new Union();
8989
fs.use(mfs as any).use(realFs);
9090

91-
//direct webpack to use unionfs for file input
92-
compiler.inputFileSystem = fs;
93-
//direct webpack to output to memoryfs rather than to disk
91+
// direct webpack to use unionfs for file input
92+
// needs workaround from https://github.com/webpack/webpack/issues/18242#issuecomment-2018116985 since webpack 5.91.0
93+
compiler.inputFileSystem = fs as any as typeof compiler.inputFileSystem;
94+
// direct webpack to output to memoryfs rather than to disk
9495
compiler.outputFileSystem = {
9596
...mfs,
9697
join: path.join,

0 commit comments

Comments
 (0)