useLightningcss
This feature is currently experimental and subject to change, it's not recommended for production. Try it out and share your feedback onGitHub.
Last updated October 9, 2025
Experimental support for usingLightning CSS with webpack. Lightning CSS is a fast CSS transformer and minifier, written in Rust.
If this option is not set, Next.js on webpack usesPostCSS withpostcss-preset-env by default.
Turbopack uses Lightning CSS by default since Next 14.2. This configuration option has no effect on Turbopack. Turbopack always uses Lightning CSS.
next.config.ts
importtype { NextConfig }from'next'constnextConfig:NextConfig= { experimental: { useLightningcss:false,// default, ignored on Turbopack },}exportdefault nextConfigVersion History
| Version | Changes |
|---|---|
15.1.0 | Support foruseSwcCss was removed from Turbopack. |
14.2.0 | Turbopack's default CSS processor was changed from@swc/css to Lightning CSS.useLightningcss became ignored on Turbopack, and a legacyexperimental.turbo.useSwcCss option was added. |
Was this helpful?