-
Notifications
You must be signed in to change notification settings - Fork 10
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
Does code coverage get bundled into production builds? #8
Comments
It will show up in the server bundle since it's You can test this yourself with https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer |
Does that mean that the production code getting deployed would be instrumented with code coverage lines? That would be a performance hit and not ideal. |
It would show up in the server bundle overall; however, I believe API routes are code-split by default with Next.js so only this specific route would include the dependency. Additionally, the instrumentation is for the UI code only. So, I don't see that it's possible for instrumentation code to be included anywhere in your actual application code. |
Ah, so this does not instrument server-side code? So this won't allow me to collect coverage on the server? |
Correct. That's an open issue here: #3 If you find a solution, definitely let me know! It seems to be a limitation of |
Will the istanbul code coverage instrumented code get bundled for production and be part of a production build?
The text was updated successfully, but these errors were encountered: