Skip to content

Commit

Permalink
src check against both
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 13, 2025
1 parent 5ce9dd5 commit 247cd0d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/builders/rollup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ export function getRollupOptions(ctx: BuildContext): RollupOptions {
}

// Source is always bundled
if (
originalId[0] === "." ||
isAbsolute(originalId) ||
/src[/\\]/.test(originalId) ||
originalId.startsWith(ctx.pkg.name!)
) {
return false;
for (const id of [originalId, resolvedId]) {
if (
id[0] === "." ||
isAbsolute(id) ||
/src[/\\]/.test(id) ||
id.startsWith(ctx.pkg.name!)
) {
return false;
}
}

// Check for other explicit inline rules
Expand Down

0 comments on commit 247cd0d

Please sign in to comment.