Skip to content

Conversation

@hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Sep 16, 2024

It looks like this is now possible thanks to this PR:

We need to wait for next nightly release.


Actually I'd like the same thing for server reference and I would imagine Next.js also needs it to handle top-level-await similarly for server reference? That would help removing my yet another hack here:

// make server reference async for simplicity (stale chunkCache, etc...)
// see TODO in https://github.com/facebook/react/blob/33a32441e991e126e5e874f831bd3afc237a3ecf/packages/react-server-dom-webpack/src/ReactFlightClientConfigBundlerWebpack.js#L131-L132
code = code.replaceAll("if (isAsyncImport(metadata))", "if (true)");
code = code.replaceAll("4 === metadata.length", "true");

Copy link
Owner Author

hi-ogawa commented Sep 16, 2024

@hi-ogawa hi-ogawa marked this pull request as ready for review September 17, 2024 00:44
@hi-ogawa hi-ogawa force-pushed the refactor-async-client-reference-entry branch from 91e8e74 to d052639 Compare September 22, 2024 09:54
@hi-ogawa hi-ogawa changed the title refactor: use ImportManifestEntry.async refactor: use ImportManifestEntry.async for async client reference module Sep 22, 2024
@hi-ogawa hi-ogawa changed the title refactor: use ImportManifestEntry.async for async client reference module refactor!: use ImportManifestEntry.async for async client reference module Sep 23, 2024
@hi-ogawa hi-ogawa closed this Jun 6, 2025
@hi-ogawa hi-ogawa deleted the refactor-async-client-reference-entry branch June 6, 2025 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants