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

Can't lazy-load a module using Next.js Dynamic Import if the module relies on data provided by getCustomInitialProps #13

Open
aatu-ikius opened this issue Oct 20, 2022 · 1 comment

Comments

@aatu-ikius
Copy link

It's not possible to lazy-load a page module using Next.js' Dynamic Import feature (which extends the React.lazy function), if the module relies on custom data provided by its getCustomInitialProps function. If the module doesn't have a getCustomInitialProps function, importing it dynamically works as expected.

@joelvarty
Copy link
Member

Do you have a code example for this @aatu-ikius ?

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

No branches or pull requests

2 participants