Skip to content

Vite injects __vitePreload even if the modulePreload option is disabled #18551

@lubomirblazekcz

Description

@lubomirblazekcz

Describe the bug

Vite injects __vitePreload on each dynamic import, I would expected this not be included when modulePreload is set to false.

Eg. If I want to handle preloading manually or not at all.

Related #13952 #13973

Reproduction

https://stackblitz.com/edit/vitejs-vite-p54vgg

Steps to reproduce

Run vite build and the output is actually larger then the source.

System Info

..

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions