Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: workaround broken fs types
  • Loading branch information
pichlermarc committed Aug 28, 2024
commit b4c9a968b6786f0fb72c22a7bfb24b2b9997da11
7 changes: 4 additions & 3 deletions api/test/tree-shaking/tree-shaking.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ describe('tree-shaking', () => {
const fs = new Union();
fs.use(mfs as any).use(realFs);

//direct webpack to use unionfs for file input
compiler.inputFileSystem = fs;
//direct webpack to output to memoryfs rather than to disk
// direct webpack to use unionfs for file input
// needs workaround from https://github.com/webpack/webpack/issues/18242#issuecomment-2018116985 since webpack 5.91.0
compiler.inputFileSystem = fs as any as typeof compiler.inputFileSystem;
Comment on lines +91 to +93
Copy link
Member Author

@pichlermarc pichlermarc Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewer note: this is the only code-change I made, the rest is package.json updates.

// direct webpack to output to memoryfs rather than to disk
compiler.outputFileSystem = {
...mfs,
join: path.join,
Expand Down