Improve vitest doc #2642
VictoriqueMoe
started this conversation in
Ideas
Replies: 2 comments 14 replies
-
This solves a long standing issue for us with being able to effectively test. |
Beta Was this translation helpful? Give feedback.
1 reply
-
@VictoriqueMoe Thanks a lot for the feedback. It seems to be strange you have an issue with unplugin-swc while it's the recommended plugin by Nest.js here: https://docs.nestjs.com/recipes/swc#vitest I just tested a fresh project a with ESM stack and it seems to works as expected: It could be interesting to investigate @VictoriqueMoe. Have you a small repository to reproduce that ? |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wrote a post here: https://x.com/VictoriqueM/status/1772221942868615380?s=20
Basically, when using unplugin-swc to bundle vitest, it made (on esm) debugging impossible, it seems that for some reason, no matter how hard i tried (supplying swc settings directly or inherit from tsconfig). sourcemaps where not emited correctly, my breakpoint and debugger was all over the place.
after much trial and error trying to find an ESbuild compatible bundler for decorator metadata, i found that using @rollup/plugin-typescript worked perfectly and now i can acctually debug code.
If anyone is having issues using vitest on ESM with the debugger. do the following:
Maybe the docs should be updated to reflect this. just an idea
Beta Was this translation helpful? Give feedback.
All reactions