You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPLIT_MODULE] Make getWasmImports return Proxy (#25559)
When `SPLIT_MODULE` is set, this makes the `imports` object returned by
`getWasmImports` itself a Proxy, which redirects property requests
starting with `placeholder` to an inner handler that processes the
second module loading, and process all other property requests to the
original `imports` object itself.
This is a prepration to add multi-split loading functionality to the JS
runtime. In the multi-split mode, we don't have a single seconday module
`[modulename].deferred.wasm`, but instead multiple secondary modules. We
plan to have multiple placeholder namespace (e.g., `placeholder2`,
`placeholder3`, ...) that match those multiple files, and this can't be
hardcoded with one `placeholder` string as we currently do, so having
the `imports` object itself as a `Proxy` provides us flexibility to
handle multiple placeholder namespaces and load correct modules later.
Thanks @tlively for the idea!
0 commit comments