Description
Google Lighthouse profiling reveals a severe Time to Interactive (TTI) penalty caused by a massive JavaScript bundle size. The platform is currently importing the entire Prism.js (or highlight.js) syntax highlighting library synchronously in the main bundle to style code blocks within repository READMEs. This forces every single visitor to download and parse 150kb+ of heavy JavaScript before the page can become interactive, even if the user's README doesn't contain a single line of code.
Proposed Solution
- Audit the global Webpack/Vite bundler configuration and the
<MarkdownRenderer /> component.
- Surgically remove the synchronous import of the syntax highlighting library.
- Implement dynamic, asynchronous imports (e.g.,
React.lazy() or standard import()).
- The syntax highlighting library should only be fetched from the network if and only if the markdown parser explicitly detects a
``` code block within the README payload.
- This architectural upgrade drastically slashes the initial JavaScript bundle size, massively accelerating the Time to Interactive (TTI) and significantly boosting the Lighthouse performance score for all portfolios.
Description
Google Lighthouse profiling reveals a severe Time to Interactive (TTI) penalty caused by a massive JavaScript bundle size. The platform is currently importing the entire
Prism.js(orhighlight.js) syntax highlighting library synchronously in the main bundle to style code blocks within repository READMEs. This forces every single visitor to download and parse 150kb+ of heavy JavaScript before the page can become interactive, even if the user's README doesn't contain a single line of code.Proposed Solution
<MarkdownRenderer />component.React.lazy()or standardimport()).```code block within the README payload.