mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
c3d8f08a0c
Published pages loaded 8 render-blocking stylesheets (620 KB raw / 71.6 KB compressed), four of them for features the page did not use: the OpenAPI block CSS (185 KB), ContentKit (33 KB), the admin toolbar CSS modules, and the PDF print styles. Build the OpenAPI and ContentKit stylesheets as standalone assets and link them from the blocks themselves via React's stylesheet hoisting, so only pages that render those blocks pay for them. Move the admin toolbar behind a lazy chunk, inline the print styles in the PDF layout, and fold the two remaining CSS modules into globals.css so they stop splitting off their own chunks. Every route is down to 3 stylesheets / 380 KB raw.