Skip to content

Commit 58789c9

Browse files
authored
chore: Exclude more packages (opennextjs#950)
* chore: Exclude more packages * changeset * fix playwright * review * update changeset
1 parent 99d8909 commit 58789c9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.changeset/beige-ways-switch.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
chore: Exclude more packages
6+
7+
Will skip these packages now aswell:
8+
9+
- "typescript"
10+
- "next/dist/compiled/babel"
11+
- "next/dist/compiled/babel-packages"
12+
- "next/dist/compiled/amphtml-validator"

packages/open-next/src/build/copyTracedFiles.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,13 @@ const EXCLUDED_PACKAGES = [
3939
// This seems to be only in Next 15
4040
// Some of sharp deps are under the @img scope
4141
"@img",
42+
"typescript",
43+
"next/dist/compiled/babel",
44+
"next/dist/compiled/babel-packages",
45+
"next/dist/compiled/amphtml-validator",
4246
];
4347

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

251255
// Only files that are actually copied
252256
const tracedFiles: string[] = [];
253-
254257
//Actually copy the files
255258
filesToCopy.forEach((to, from) => {
256-
// We don't want to copy excluded packages (i.e sharp)
259+
// We don't want to copy excluded packages (e.g. sharp)
257260
if (isExcluded(from)) {
258261
return;
259262
}

0 commit comments

Comments
 (0)