-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Injecting polyfills for vitest browser #5347
Comments
Can't you use |
Nope, they are loaded after |
If |
As a team, we decided that the Vitest browser mode only supports browsers that implement |
It is reasonable that vitest wont support old browsers out of the box. I was just asking if you would consider to support scripts injection in order to let developers to load polyfills themselves 🙂 |
We did another round of discussion and decided it would be a good idea to expose an option to inject a script into HTML. Vitest has two HTML documents, so there will be two options. |
Thank you so much! |
Clear and concise description of the problem
Vitest for browser ships with a polyfill-free policy, which is good. Sometimes we need to run tests across older browsers (such as Safari 14) that does not support features like
BroadcastChannel
.Suggested solution
Add a sort of setup file for the runner to inject in index.html and tester.html files, in order to polyfill some features.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: