-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add a GlobalInformation struct #8912
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
8 Skipped Deployments
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -122,6 +123,8 @@ pub struct BrowserChunkingContext { | |||
minify_type: MinifyType, | |||
/// Whether to use manifest chunks for lazy compilation | |||
manifest_chunks: bool, | |||
/// Global information | |||
global_information: Vc<OptionGlobalInformation>, |
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.
Option<Vc<GlobalInformation>>
@@ -133,6 +136,7 @@ impl BrowserChunkingContext { | |||
asset_root_path: Vc<FileSystemPath>, | |||
environment: Vc<Environment>, | |||
runtime_type: RuntimeType, | |||
global_information: Vc<OptionGlobalInformation>, |
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.
That shouldn't be passed here (we don't want to force to always pass that).
Instead add a global_information()
method to pass that, similar to the other optional fields
@@ -96,6 +99,7 @@ impl NodeJsChunkingContext { | |||
asset_root_path: Vc<FileSystemPath>, | |||
environment: Vc<Environment>, | |||
runtime_type: RuntimeType, | |||
global_information: Vc<OptionGlobalInformation>, |
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.
Same as above
… ChunkingContext trait. Constructing a new GlobalInformation object takes a Project parameter, giving the constructor access to global information
544f700
to
721c53b
Compare
### What? Refactored module ID strategies implementation to walk modules graph individually for each endpoint. Based on feedback from [next.js#68408](#68408) and [turbo#8912](vercel/turborepo#8912). Comments marked with `NOTE(LichuAcu)` are intended to make reviewing easier and will be removed before merging.
Description
A
GlobalInformation
struct is added, which is made available through theChunkingContext
trait. Constructing a newGlobalInformation
takes aProject
parameter, which gives the constructor access to global information.ChunkingContext
builder methods now also take aGlobalInformation
object.Testing Instructions