-
Notifications
You must be signed in to change notification settings - Fork 177
Fix and enhancement for Next 16 #1029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
ddd4871
8b3337f
ede37c4
68da714
527cd0b
5c8bcd3
b3c7880
9780d65
2913e70
3ba2300
9b7f726
d017a4a
dfb4cfb
d04a75f
28b377f
3982bb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@opennextjs/aws": minor | ||
| --- | ||
|
|
||
| Add support for Next 16 | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -105,6 +105,10 @@ export function createCacheAssets(options: buildHelper.BuildOptions) { | |||||||
| const isFileSkipped = (relativePath: string) => | ||||||||
| relativePath.endsWith(".js") || | ||||||||
| relativePath.endsWith(".js.nft.json") || | ||||||||
| // We skip manifest files as well | ||||||||
| relativePath.endsWith("-manifest.json") || | ||||||||
| // We skip the segment rsc files as they are treated in a different way | ||||||||
| relativePath.endsWith(".segment.rsc") || | ||||||||
| (relativePath.endsWith(".html") && htmlPages.has(relativePath)); | ||||||||
|
|
||||||||
| // Merge cache files into a single file | ||||||||
|
|
@@ -169,6 +173,24 @@ export function createCacheAssets(options: buildHelper.BuildOptions) { | |||||||
| logger.warn(`Skipping invalid cache file: ${cacheFilePath}`); | ||||||||
| return; | ||||||||
| } | ||||||||
| const segments: Record<string, string> = {}; | ||||||||
|
|
||||||||
| // If we have a meta file, and it contains segmentPaths, we need to add them to the cache file | ||||||||
| if ( | ||||||||
| cacheFileMeta && | ||||||||
| Array.isArray(cacheFileMeta.segmentPaths) && | ||||||||
|
||||||||
| cacheFileMeta && | |
| Array.isArray(cacheFileMeta.segmentPaths) && | |
| Array.isArray(cacheFileMeta?.segmentPaths) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cacheFileMeta.segmentPaths.length > 0 could also be skipped maybe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like:
const segments: Record<string, string> = Array.isArray(cacheFileMeta?.segmentPaths) ?
Object.fromEntries(cacheFileMeta.segmentPaths.map(...)) :
{};
Uh oh!
There was an error while loading. Please reload this page.