Skip to content
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

The rollup hook resolveDynamicImport does not work in dev #1588

Open
csr632 opened this issue Jan 19, 2021 · 1 comment
Open

The rollup hook resolveDynamicImport does not work in dev #1588

csr632 opened this issue Jan 19, 2021 · 1 comment
Labels

Comments

@csr632
Copy link
Member

csr632 commented Jan 19, 2021

Is your feature request related to a problem? Please describe.

I want to hook into the resolution logic of import('/virtual/path').

Describe the solution you'd like
Make the rollup hook resolveDynamicImport works in dev. It works similar to resolveId hook, but applied to dynamic import

Describe alternatives you've considered
We can also make resolveId apply to dynamic import.

Rollup uses resolveId as fallback of resolveDynamicImport.

@yyx990803 yyx990803 added the enhancement New feature or request label Jan 19, 2021
@reverofevil
Copy link

Uhm, any news about this? This is a blocker to using SSR with React 18. You need to add <script defer> for every thing that was import()ed during server rendering into the end of generated HTML, so that before you hydrate everything is already loaded. Otherwise it will overwrite already generated HTML for <Suspense> with loaders.

At the moment there is no API to collect the list of loaded dynamic imports during SSR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants