You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce render blocking css for components that are lazy loaded with dynamic(...)
Make it easier to choose which components should generate render blocking styling, and which styling can be lazy loaded
Background
Currently you can import components dynamically, forcing next to create a separate js-chunk and lazy load the component.
But the styling still gets rendered in the main page css file that is render blocking.
This causes performance issues when the css gets big, with no way to tell next which parts can be loaded after page load.
Proposal
When importing a component using dynamic, the styling for that component and children could end up in a separat below-the-fold css file that's not render blocking.
Today the styling inside DynamicFooter is bundled with the main render-blocking css file. dynamic is already an established tool for lazy loading components. So it would be natural that the styling for that components also get loaded below the fold.
And we would avoid long pages having poor page speed because of poor TBT (Total blocking time) score.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
Currently you can import components dynamically, forcing next to create a separate js-chunk and lazy load the component.
But the styling still gets rendered in the main page css file that is render blocking.
This causes performance issues when the css gets big, with no way to tell next which parts can be loaded after page load.
Proposal
When importing a component using
dynamic
, the styling for that component and children could end up in a separat below-the-fold css file that's not render blocking.Today the styling inside DynamicFooter is bundled with the main render-blocking css file.
dynamic
is already an established tool for lazy loading components. So it would be natural that the styling for that components also get loaded below the fold.And we would avoid long pages having poor page speed because of poor TBT (Total blocking time) score.
Beta Was this translation helpful? Give feedback.
All reactions