Skip to content

Commit b5ae6ac

Browse files
authored
fix: crash when using node 22 for bundling in development (#596)
* fix: remove unnecessary transferList in webpackWorker * chore: add changeset
1 parent 34a9bf3 commit b5ae6ac

2 files changed

Lines changed: 19 additions & 17 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@callstack/repack": patch
3+
---
4+
5+
fix crash when using Node 22 for bundling in development

packages/repack/src/webpack/webpackWorker.ts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,20 @@ async function main(cliOptions: CliOptions) {
5353
info: asset.info,
5454
};
5555
});
56-
parentPort?.postMessage(
57-
{
58-
event: 'done',
59-
assets,
60-
stats: stats.toJson({
61-
all: false,
62-
cached: true,
63-
children: true,
64-
modules: true,
65-
timings: true,
66-
hash: true,
67-
errors: true,
68-
warnings: false,
69-
}),
70-
},
71-
assets.map((asset) => asset.data.buffer)
72-
);
56+
parentPort?.postMessage({
57+
event: 'done',
58+
assets,
59+
stats: stats.toJson({
60+
all: false,
61+
cached: true,
62+
children: true,
63+
modules: true,
64+
timings: true,
65+
hash: true,
66+
errors: true,
67+
warnings: false,
68+
}),
69+
});
7370
});
7471

7572
compiler.watch(watchOptions, (error) => {

0 commit comments

Comments
 (0)