mui / pigment-css

Pigment CSS is a zero-runtime CSS-in-JS library that extracts the colocated styles to their own CSS files at build time.
MIT License
396 stars 19 forks source link

[examples] Update Next.js example to use ESM #88

Open oliviertassinari opened 1 month ago

oliviertassinari commented 1 month ago

Summary

https://github.com/mui/pigment-css/blob/b4e2d779d6bcccab2e8df917e2df20c15ff40fc2/examples/pigment-css-nextjs-ts/next.config.js#L1

is using CJS. But npx create-next-app@latest gives you a next.config.mjs file. So we need to update this example.

Motivation

Make it easier to copy and paste the example to an existing project.