is experimental: { optimizeCss: true } still in use for nextJS v14.2 #80486
Replies: 1 comment
-
Hi! Great question about Current Status ✅After checking the Next.js source code, How it works:The feature uses Critters under the hood to inline critical CSS and optimize CSS delivery. Here's what I found in the source: // From next/src/server/config-shared.ts
experimental?: {
optimizeCss?: boolean | CritersOptions
} Usage in Next.js v14.2:// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
optimizeCss: true, // or pass Critters options object
},
}
module.exports = nextConfig Alternative:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
We’re using Next.js v14.2 with the App Router. I noticed that experimental: { optimizeCss: true } is no longer mentioned in the official documentation, and it previously relied on the critters package, which is now deprecated.
Just wanted to check — is this setting still in use or has it been removed/handled differently in the newer versions?
https://www.npmjs.com/package/critters
Thanks!
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions