Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions .changeset/beige-ways-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@opennextjs/aws": patch
---

chore: Exclude more packages

Will skip these packages now aswell:

- "typescript"
- "next/dist/compiled/babel"
- "next/dist/compiled/babel-packages"
- "next/dist/compiled/amphtml-validator"
9 changes: 6 additions & 3 deletions packages/open-next/src/build/copyTracedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ const EXCLUDED_PACKAGES = [
// This seems to be only in Next 15
// Some of sharp deps are under the @img scope
"@img",
"typescript",
"next/dist/compiled/babel",
"next/dist/compiled/babel-packages",
"next/dist/compiled/amphtml-validator",
];

function isExcluded(srcPath: string) {
function isExcluded(srcPath: string): boolean {
return EXCLUDED_PACKAGES.some((excluded) =>
srcPath.match(getCrossPlatformPathRegex(`/node_modules/${excluded}/`)),
);
Expand Down Expand Up @@ -250,10 +254,9 @@ File ${serverPath} does not exist

// Only files that are actually copied
const tracedFiles: string[] = [];

//Actually copy the files
filesToCopy.forEach((to, from) => {
// We don't want to copy excluded packages (i.e sharp)
// We don't want to copy excluded packages (e.g. sharp)
if (isExcluded(from)) {
return;
}
Expand Down
Loading