May 4, 2021

Next.js taps Webpack 5 for faster builds

The latest upgrade of Vercel’s Next.js framework for building React web applications speeds up builds and refreshes with expanded use of the Webpack 5 module bundler.

Introduced April 28, Next.js 10.2 uses Webpack 5 to improve disk caching, allowing the compiler to persist work between build runs. Because only changed files will be recompiled, performance of subsequent builds is dramatically improved, by up to 63 percent.

With Next.js 10.2, all applications that do not use a custom webpack configuration in their next config.js will automatically use Webpack 5. Webpack 5 also offers benefits including better fast refresh and improved long-term asset caching. Also, CommonJS now can be tree-shaken to automatically remove unused code.

To read this article in full, please click here

Leave Comment

Your Name *
Your Email *
Your Website
Comment *