Skip to content

There is no way to disable/filter preload #3133

@xhebox

Description

@xhebox

Clear and concise description of the problem

Vite now will not only insert preload directives to the HTML file by the build-html plugin, but also preload helpers for all non-HTML entries by the ImportAnalysis plugin.

And sometimes, you really want lazy loading rather than preloading everything, even for the main HTML entry. There should be a method to control the preload directives generation and preload helper insertion.

Suggested solution

A boolean switch in the config file is enough for me. But maybe a hook function will be better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions