-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
refactor: remove jest condition #8783
Conversation
✅ Deploy Preview for vite-docs-main canceled.
|
Wouldn't this break for other Vite projects using Jest? Though I'm also fine with doubling-down to avoid the ESM shenanigans. |
Yes, we left this condition to avoid breaking other projects. I think we should do this change, but maybe lets wait a bit more. The ecosystem already has a lot on its hands trying to get their projects working with Vite 3. |
/ecosystem-ci run |
I'm still unsure if we could move forward with this change in Vite 5, but then the question is when we would be able to do it. Jest will still continue to be used widely for years to come. |
Maybe at the same time as going ESM only? We could also do a warning for Vite 5 at the mean time. |
I'm checking this today to see what's the reason we have the code in the first place. #5197 adds it but it's not quite clear how to reproduce it today to see if it's fixed. The issue isn't that ESM doesn't work in Jest, it's that Jest is emulating ESM wrongly (iiuc), and we're working around that bug. Given that:
I think we can take a shot in removing this Jest handling. And if we get reports of Jest incompatibility post-launch, we can reevaluate and revert if needed. |
Since my forked repo and branch were accidentally removed. Created a new PR: #14544 |
Description
Since Vite have migrated to Vitest #8076 and removed Jest, so some conditions can be removed.
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).