-
Notifications
You must be signed in to change notification settings - Fork 3.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
feat: support vite.config.mts and vite.config.cts #22782
feat: support vite.config.mts and vite.config.cts #22782
Conversation
It's added in Vite 3.0: vitejs/vite#8729
Thanks for taking the time to open a PR!
|
Hi, thanks! Are you able to sign the CLA? #22782 (comment) I think we still need more work for proper Vite 3 support, which I am tracking here: #22784, but we can merge this in the mean time, once the CLA is 🖊️ and the CI is ✔️ |
Signed 😄 |
Cool, I triggered CI, should be ✔️, will keep an eye on it. In the meantime I am looking at Vite 3 support, hopefully it won't be too many changes 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
It's added in Vite 3.0:
vitejs/vite#8729
User facing changelog
Features:
vite.config.mts
andvite.config.cts
Additional details
As of Vite 3.0,.mts
and.cts
extensions are properly supported.Not sure what's happening here, but seems an issue due to the config file transformation in Vite 3 in combination with the
ts-node
used internally in Cypress.So, in a package without
"type": "module"
, usingimport.meta
in a plain.ts
file is equivalent to using it in a.cts
file, which leads to a syntax error.The fix is to either convert the package to
type: "module"
as a whole (which would bring many unexpected side effects), or use a proper.mts
extension (which Cypress 10.3.0 doesn't yet support). Thus this PR.Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?