Skip to content

Commit 9a34fb4

Browse files
committed
fix: skipNodeModulesBundle for monorepo
1 parent 426ab46 commit 9a34fb4

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/features/external.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,16 @@ Imported by ${underline(importer)}`,
8989

9090
if (skipNodeModulesBundle) {
9191
const resolved = await context.resolve(id, importer, extraOptions)
92-
if (!resolved) return false
93-
return resolved.external || RE_NODE_MODULES.test(resolved.id)
92+
if (
93+
resolved &&
94+
(resolved.external || RE_NODE_MODULES.test(resolved.id))
95+
) {
96+
return true
97+
}
9498
}
9599

96-
if (deps) {
97-
return deps.some((dep) => id === dep || id.startsWith(`${dep}/`))
100+
if (deps && deps.some((dep) => id === dep || id.startsWith(`${dep}/`))) {
101+
return true
98102
}
99103

100104
return false

0 commit comments

Comments
 (0)