Skip to content

Commit d7ba0b0

Browse files
committed
update
1 parent 02f5ede commit d7ba0b0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/build/chunks.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ export function getChunkName(chunk: { name: string; moduleIds: string[] }, nitro
2727
return "_runtime.mjs";
2828
}
2929

30-
// _ chunks are preserved
31-
if (chunk.name.startsWith("_")) {
32-
return `${chunk.name}.mjs`;
33-
}
34-
3530
// Library chunks
3631
if (chunk.moduleIds.every((id) => NODE_MODULES_RE.test(id))) {
3732
const chunkName = joinPkgNames(chunk.moduleIds);
@@ -41,6 +36,11 @@ export function getChunkName(chunk: { name: string; moduleIds: string[] }, nitro
4136
return `_libs/${chunkName || "_"}.mjs`;
4237
}
4338

39+
// _ chunks are preserved (should be after library normalization)
40+
if (chunk.name.startsWith("_")) {
41+
return `${chunk.name}.mjs`;
42+
}
43+
4444
// No moduleIds
4545
if (chunk.moduleIds.length === 0) {
4646
return `_chunks/${chunk.name}.mjs`;

0 commit comments

Comments
 (0)