GoogleChromeLabs / critters

🦔 A Webpack plugin to inline your critical CSS and lazy-load the rest.
https://npm.im/critters-webpack-plugin
Apache License 2.0
3.42k stars 108 forks source link

How to use critters in next.js v13 #126

Closed yudiz-kandarp closed 8 months ago

marco910 commented 1 year ago
  1. Add experimental: { optimizeCss: true } to your next.config.js
  2. Run npm i -D critters to install Critters.

That's it

leerob commented 8 months ago

Note for those landing here through search, Critters does not work with the App Router: https://github.com/vercel/next.js/discussions/59989#discussioncomment-7962270