Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tall-pets-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/aws": patch
---

Fix: Ignore packages under the @img/\* scope to exclude sharp from the server bundle.
5 changes: 4 additions & 1 deletion packages/open-next/src/build/copyTracedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ File ${fullFilePath} does not exist
//TODO: we need to figure which packages we could safely remove
from.includes(path.join("node_modules", "caniuse-lite")) ||
// from.includes("jest-worker") || This ones seems necessary for next 12
from.includes(path.join("node_modules", "sharp"))
from.includes(path.join("node_modules", "sharp")) ||
// This seems to be only in Next 15
// Some of sharp deps are under the @img scope
from.includes(path.join("node_modules", "@img"))
) {
return;
}
Expand Down
Loading