code-coverage icon indicating copy to clipboard operation
code-coverage copied to clipboard

Add support for SWC

Open lone-cloud opened this issue 2 years ago • 9 comments

SWC (https://github.com/swc-project/swc) is a more performant babel replacement that's being shipped with some frameworks like Next.js This library only appears to work strictly with babel and I was not yet able to figure out how to get it working with SWC's code instrumentation plugin: https://github.com/kwonoj/swc-coverage-instrument

lone-cloud avatar Jul 18 '22 21:07 lone-cloud

This works for me:https://github.com/kwonoj/swc-plugin-coverage-instrument

MattyBalaam avatar Oct 19 '22 15:10 MattyBalaam

@MattyBalaam which steps did you take to set this up?

arendjantetteroo avatar Oct 31 '22 11:10 arendjantetteroo

@arendjantetteroo I can't recall, but I think I just followed the readme

MattyBalaam avatar Oct 31 '22 12:10 MattyBalaam

Any updates on this topic? Trying to setup with the plugin, but it does not work :(

renatojf avatar Feb 01 '23 21:02 renatojf

Thanks for the downvotes guys 😆

The readme was pretty straightforward I have to say, here’s a screenshot of our loader config but it‘s no different from the readme.

Screenshot 2023-03-14 at 13 28 41

Unfortunately, this has stopped working with @swc/core 1.3.39

MattyBalaam avatar Mar 14 '23 13:03 MattyBalaam

Thanks for the downvotes guys 😆

The readme was pretty straightforward I have to say, here’s a screenshot of our loader config but it‘s no different from the readme.

Screenshot 2023-03-14 at 13 28 41

Unfortunately, this has stopped working with @swc/core 1.3.39

should i write in next.config.js?

Mistrain-y-y avatar Aug 01 '23 08:08 Mistrain-y-y

Thanks for the downvotes guys 😆 The readme was pretty straightforward I have to say, here’s a screenshot of our loader config but it‘s no different from the readme. Screenshot 2023-03-14 at 13 28 41 Unfortunately, this has stopped working with @swc/core 1.3.39

should i write in next.config.js?

I don't know about next config, we don't use it. This is a webpack config for compiling react components

MattyBalaam avatar Aug 01 '23 09:08 MattyBalaam

Any traction on this? Not supporting Next out-of-the box seems like a miss for Cypress.io

jasonmit avatar Nov 17 '23 18:11 jasonmit