Skip to content

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

@aatuvai

Description

@aatuvai

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions