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

Upgrade to atleast Next.js 12.2 (Current: 12.1.6) #64

Open
soumitradev opened this issue Jan 8, 2023 · 0 comments
Open

Upgrade to atleast Next.js 12.2 (Current: 12.1.6) #64

soumitradev opened this issue Jan 8, 2023 · 0 comments

Comments

@soumitradev
Copy link
Member

Eventually, we have to move to Next.js 13, to avoid eventual deprecation. In Next.js 12, SWC (https://swc.rs/) was introduced, which claims to make page builds much faster than the current JS compiler (Babel). Future versions of Next.js will continue to support SWC better, which is why it is a no-brainer to move to it. It will lower build times significantly, speeding up dev, and also reducing server costs (esp. Netlify).

However, the current build system uses a Babel plugin, called "istanbul". I haven't looked too much into it, but it seems to be there to help test the code. To preserve the same build system, we will need to use the same plugin for SWC. There is a plugin available, that does the same job for SWC: https://github.com/kwonoj/swc-plugin-coverage-instrument. However, SWC plugins were only introduced in Next.js 12.2 as experimental. To move to SWC without breaking anything, we must upgrade to atleast Next.js 12.2.

Since an upgrade to a newer version of Next.js is inevitable, we should probably make the move to SWC and upgrade Next.js simultaneously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant