mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### Why? Styles imported from RSC are processed twice by webpack loaders and postcss. This is not only expensive, but can also lead to hanging problems if both executions doesn't result in the same code (e. g. when using randomness in webpack loaders). ### What? Add a transition to styles to place them in the client context when import on RSC side. fixes #69643 fixes PACK-3243
8 lines
172 B
TypeScript
8 lines
172 B
TypeScript
import dynamic from 'next/dynamic'
|
|
|
|
const DynamicComponent = dynamic(() => import('../components/hello'))
|
|
|
|
export default function Page() {
|
|
return <DynamicComponent />
|
|
}
|