-
I've setup a minimal example to demonstrate the problem I face: Let's say that I have two entries:
They share some common modules (e.g. React), so the generated files are
foo.html looks like
However, with React 18's renderToPipeableStream, <script async> is recommended to use. Please see this post for more details. So the SSR'ed HTML becomes
Because of the nature of async, we cannot guarantee the shared-bundle is loaded/executed before. You can checkout the repo, where I intentionally make shared-bundle 2 seconds slower to download. I wonder how to make shared bundle play nicely with One way I can think of is that shared bundle is loaded by JS instead of being placed on generated HTML. Thank you for help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There was some work for this here: #9227 |
Beta Was this translation helpful? Give feedback.
There was some work for this here: #9227
But I don't know any details on how to use that