-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
turbopack: defer dev code evaluation until after page render IPC connects #47888
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8881754
turbopack: defer pages user code eval until after IPC connects
jridgewell f2fcfb5
Remove logs
jridgewell 439e3dd
Merge branch 'canary' into jrl-page-parse-error
kodiakhq[bot] e19a21b
Merge branch 'canary' into jrl-page-parse-error
sokra 4c3622d
Merge branch 'canary' into jrl-page-parse-error
kodiakhq[bot] 175bcf6
Merge branch 'canary' into jrl-page-parse-error
jridgewell 2f4143f
Merge branch 'canary' into jrl-page-parse-error
kodiakhq[bot] 662586a
Merge branch 'canary' into jrl-page-parse-error
kodiakhq[bot] 08d9855
Merge branch 'canary' into jrl-page-parse-error
kodiakhq[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
18 changes: 10 additions & 8 deletions
18
packages/next-swc/crates/next-core/js/src/entry/server-data.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
// IPC need to be the first import to allow it to catch errors happening during | ||
// the other imports | ||
import startHandler from "@vercel/turbopack-next/internal/page-server-handler"; | ||
import startHandler from '@vercel/turbopack-next/internal/page-server-handler' | ||
|
||
// eslint-disable-next-line | ||
import Document from "next/document"; | ||
import App from "next/app"; | ||
|
||
import * as otherExports from "INNER"; | ||
import Document from 'next/document' | ||
import App from 'next/app' | ||
|
||
startHandler({ | ||
isDataReq: true, | ||
App, | ||
Document, | ||
Component: () => {}, | ||
otherExports, | ||
}); | ||
mod: () => { | ||
return import('INNER').then((namespace) => ({ | ||
Component: () => null, | ||
namespace, | ||
})) | ||
}, | ||
}) |
20 changes: 11 additions & 9 deletions
20
packages/next-swc/crates/next-core/js/src/entry/server-renderer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
// IPC need to be the first import to allow it to catch errors happening during | ||
// the other imports | ||
import startHandler from "@vercel/turbopack-next/internal/page-server-handler"; | ||
import startHandler from '@vercel/turbopack-next/internal/page-server-handler' | ||
|
||
import App from "@vercel/turbopack-next/pages/_app"; | ||
import Document from "@vercel/turbopack-next/pages/_document"; | ||
import App from '@vercel/turbopack-next/pages/_app' | ||
import Document from '@vercel/turbopack-next/pages/_document' | ||
|
||
import Component, * as otherExports from "INNER"; | ||
|
||
import chunkGroup from "INNER_CLIENT_CHUNK_GROUP"; | ||
import chunkGroup from 'INNER_CLIENT_CHUNK_GROUP' | ||
|
||
startHandler({ | ||
isDataReq: false, | ||
App, | ||
Document, | ||
Component, | ||
otherExports, | ||
mod: () => { | ||
return import('INNER').then((namespace) => ({ | ||
Component: namespace.default as any, | ||
namespace, | ||
})) | ||
}, | ||
chunkGroup, | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These might also contain user code
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.
Can you explain? Do they invoke user code as part of module evaluation? These are wrappers around next's code, right?