Skip to content

Commit d33b983

Browse files
committed
chore: improve chunk names
1 parent 52d09c4 commit d33b983

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/build/chunks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Nitro } from "nitro/types";
22
import { presetsDir, runtimeDir } from "nitro/meta";
33

4-
const virtualRe = /^\0|^virtual:/;
4+
const virtualRe = /^(?:\0|#|virtual:)/;
55

66
export const NODE_MODULES_RE = /node_modules[/\\][^.]/;
77

@@ -21,7 +21,7 @@ export function getChunkName(
2121
return `${chunk.name}.mjs`;
2222
}
2323
if (chunk.name === "rolldown-runtime") {
24-
return "_runtime/rolldown.mjs";
24+
return "_rolldown.mjs";
2525
}
2626

2727
// No moduleIds
@@ -58,7 +58,7 @@ export function getChunkName(
5858
if (
5959
ids.every((id) => id.startsWith(runtimeDir) || id.startsWith(presetsDir))
6060
) {
61-
return `_runtime/[name].mjs`;
61+
return `_nitro/[name].mjs`;
6262
}
6363

6464
// Try to match user defined routes or tasks

0 commit comments

Comments
 (0)