1 year ago
#304301

Eden Chan
Is there a way to use .babelrc for development/testing environments, and SWC for production environment?
I am using a Cypress code coverage plugin that depends on istanbul which is not supported by SWC, so in order for it to work, I have it configured in a .babelrc
file at the root of my Next.js project. I only need the plugin for dev/testing environments, so it's not needed for production environment. Is there a way to configure my Next.js project so it still opts in for SWC in production, and ignores the .babelrc in dev/testing environments?
next.js
babeljs
cypress
code-coverage
istanbul
0 Answers
Your Answer