mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
fdaf35b96b
In app router `experimental.cssChunking` is enabled by default in "loose" mode. This is to solve issues with CSS ordering & reduce the number of requests for CSS resources (more information can be found in the [original PR](https://github.com/vercel/next.js/pull/63157) and the [docs](https://nextjs.org/docs/app/api-reference/next-config-js/cssChunking)). However, it can lead to shared CSS from unrelated pages being included in the initially loaded CSS. This isn't always desireable, as expressed in https://github.com/vercel/next.js/discussions/70168. It also leads to a drift in behavior between dev/start, as the plugin is only implemented in start. This provides a third option to the plugin to disable it completely for those who are ok with the trade-offs of not having it enabled.
21 lines
378 B
TypeScript
21 lines
378 B
TypeScript
import type { Metadata } from 'next'
|
|
import React from 'react'
|
|
import './globals.css'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Create Next App',
|
|
description: 'Generated by create next app',
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<html lang="en">
|
|
<body>{children}</body>
|
|
</html>
|
|
)
|
|
}
|