Skip to content
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

Add SWC support for istanbul #4114

Closed
eden-chan opened this issue Mar 21, 2022 · 4 comments
Closed

Add SWC support for istanbul #4114

eden-chan opened this issue Mar 21, 2022 · 4 comments
Assignees

Comments

@eden-chan
Copy link

eden-chan commented Mar 21, 2022

Describe the feature

Add SWC support for istanbul

Babel plugin or link to the feature description

https://www.npmjs.com/package/babel-plugin-istanbul

Additional context

I am using SWC, but need to use istanbul for my Cypress Code Coverage plugin. Since it is not supported by SWC, I am opting out of SWC for Babel. Some other devs also opted out too. Not sure what the progress is on this.
image

image

vercel/next.js#30529
vercel/next.js#30174

@kwonoj
Copy link
Member

kwonoj commented Mar 21, 2022

What exactly swc needs to support other than istanbul's comment directive (#3854 (comment))?

Oh I missed plugin part. Someone needs to write plugin if it need to be supported.

@kwonoj
Copy link
Member

kwonoj commented Mar 23, 2022

Let's see if it's possible to port into plugin. This requires to port some of istanbul itself (lib-instrument for example)

@kwonoj
Copy link
Member

kwonoj commented May 5, 2022

This is now available via vercel/next.js#36692 and https://github.com/kwonoj/swc-coverage-instrument, though I expect there'll be some rough edges need to fix forward. It is unclear if we'll move this codes into swc upstream's plugin repo or not at this moment.

Given this'll probably not be included in @swc/core, I'll close this issue as sort of complete. Feedbacks, or issues can be reported in next.js directly instead.

@kwonoj kwonoj closed this as completed May 5, 2022
@kdy1 kdy1 modified the milestone: Planned May 5, 2022
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 16, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants