-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
refactor: optimize bundling performance, pre-transpile client code so that sites don't have to #10062
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: -39.8 kB (-2%) Total Size: 1.55 MB
ℹ️ View Unchanged
|
I decided to stop investigating this optimization for now, because the impact is not significant enough compared to the extra complexity it involves. Here's the result on my computer (Mac M3) Bundling the initial template (contains few docs, mostly the theme code):
Bundling our website (more docs):
So:
For that reason, let's close this for now |
Motivation
The idea is that sites should not need to transpile official Docusaurus client code, saving time when bundling.
We can ship those client libs pre-transpiled by default so that they can be excluded from our JS loader.
There are some challenges to resolve:
<Translate>
is preserved)Test Plan
tests + CI + dogfood
Test links
https://deploy-preview-10062--docusaurus-2.netlify.app/