Skip to content

If something is always loaded, always preload it #20671

@KTibow

Description

@KTibow

Description

Say I want to load a core part of the app before further features. import makes this easy: I can just split out the further features, import them, and they won't take up space in the core bundle or defer the core code from running. But now I've introduced a waterfall.

Here's a minimal example if you don't get what I mean: https://github.com/KTibow/viterepro

Suggested solution

If something is always going to be loaded, even if through top level import(), always preload it. Maybe extend the same logic used to preload shared chunks.

Alternative

No response

Additional context

I believe this would always be the fastest approach:
Image

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions