Skip to content

Commit 22bd0c6

Browse files
committed
fix: avoid naming node_modules/.* as lib chunk
nitro build dir is `node_modules/.nitro`
1 parent 722efdc commit 22bd0c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build/chunks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function getChunkName(
2222
}
2323

2424
// Library chunks
25-
if (chunk.moduleIds.every((id) => id.includes("node_modules"))) {
25+
if (chunk.moduleIds.every((id) => /node_modules[/\\]\w/.test(id))) {
2626
const pkgNames = [
2727
...new Set(
2828
chunk.moduleIds

0 commit comments

Comments
 (0)