Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 异步加载 prism #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KonghaYao
Copy link

采用 react-syntax-highlighter 默认的异步加载模式,可以把最大包的首次加载降到 200KB 左右
image

@521xueweihan
Copy link
Member

@KonghaYao 这样确实可以降低 SSG 页面的体积,但是 First Load JS 体积多了 7 KB

  • First Load JS shared by all 160 kB

@521xueweihan 521xueweihan force-pushed the main branch 2 times, most recently from 15baa30 to 641cae7 Compare August 12, 2024 04:57
@521xueweihan 521xueweihan force-pushed the main branch 2 times, most recently from a461ee5 to f0ea061 Compare September 20, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants