-
-
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
Fails to run / parse .cts
source files.
#3987
Comments
Start a new pull request in StackBlitz Codeflow. |
Interesting. Vite doesn't process I am not sure if we should even support generated CJS, since we cannot process I would recommend running tests on already transformed files in your case. |
Note: One workaround I found was to compile the Example Setup: https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell/src/lib |
Here is a library that may help you to intercept and mock require calls: vitest-mock-require |
Is there a workaround for supporting ".cts"? |
In case this is useful to someone, here is a simple Stackblitz example: https://stackblitz.com/edit/vitest-dev-vitest-zbjtkh?file=src%2Fbasic.cts |
Any update regarding parsing .cts source files? (couldn't work around getting RollupError from parsing typescript syntax in .cts file...) |
There are no plans to support |
Describe the bug
While working with an application with a mix of
.mts
and.cts
files, vitest fails to correctly parse the.cts
source files. It seems to be treating them as.cjs
files.Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-xrug9w?file=README.md
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: