Skip to content

Commit 967b419

Browse files
committed
fix entrypoint hash
1 parent 98f1096 commit 967b419

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

build.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ export async function build({
9595
for (const output of result.outputs) {
9696
if (output.kind === "entry-point" && output.hash) {
9797
const path = relative(outdir, output.path);
98-
hashed[`/${path}`] = output.hash;
98+
// Bun has bug that generated hash cannot reflect the changes in dynamic import
99+
hashed[`/${path}`] = Bun.hash
100+
.murmur64v2(await output.arrayBuffer())
101+
.toString(16);
99102
}
100103
}
101104
Bun.write(

example/tsconfig.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"paths": {
4+
"bun-react-ssr": [".."],
5+
"bun-react-ssr/*": ["../*"]
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)