Vercel announced the launch of Next.js 12 during its Next.js annual conference. Developers can update to the latest version by running npm i next@latest. According to Vercel's CEO Guillermo Rauch, the latest enhancements to the Next.js framework will give its customers the power of dynamic at the speed of static.
Here are the highlight features:
- a new Rust compiler built on SWC to optimize bundling and compiling with ~3x faster refresh and ~5x faster builds;
- introduces middleware that makes it easier for developers to personalize content to users;
- support for ES modules to help developers transition from Common JS to ES modules;
- experimental support for importing ES modules through URLs;
- support for AVIF images through built-in Image Optimization API, and more.