vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.91k stars 26.28k forks source link

Migration cssnano to lightningcss for minify in build #67417

Open torresgol10 opened 2 days ago

torresgol10 commented 2 days ago

Migration cssnano to lightningcss for minify in build, because it is much faster and more efficient.

I have performed a test by doing a next build of the blog-starter example and this is the data:


Lightning CSS

Timing static/css/ddcd49143be6df95.css: 2.8748740000010002 Timing static/css/2a2d6e97eab1022e.css: 0.319867999998678

PostsCSS + NanoCSS

Timing static/css/ddcd49143be6df95.css: 443.4514140000001 Timing static/css/2a2d6e97eab1022e.css: 201.95785699999988

This is approximately x200 faster only when minifying the files to make the build.

ijjk commented 2 days ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer