Declare missing vite:preloadError
event on Window namespace
#17508
Labels
enhancement
New feature or request
p2-nice-to-have
Not breaking anything but nice to have (priority)
Description
Vite has a
vite:preloadError
custom event which can be used when loading a dynamic import fails.This event is not declared in the global namespace, so doing
or
will not work unless you override the event type.
Suggested solution
Declare the event in a global namespace:
Alternative
Adding this declaration to my own
vite.d.ts
file, but it feels like something Vite should export since the library knows the exact type.Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: