nextjs built in css support

nextjs built in css support

Did you know Next.js has built-in #CSS support? It’s as simple as importing a global stylesheet in your _app.{js/tsx}. Don’t import your css in an other file, since this is not supported. You can do that with component-level CSS. #javascript #typescript

Copy Snippet
import '../styles.css'

// This default export is required in a new `pages/_app.js` file.
export default function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />
}