-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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(v2): TS config update: reduce the size of npm modules #4375
Conversation
[V1] Deploy preview success Built with commit 10502d3 |
Deploy preview for docusaurus-2 ready! Built with commit 10502d3 |
Signed-off-by: Reece Dunham <me@rdil.rocks>
This comment has been minimized.
This comment has been minimized.
@armano2 I actually was looking into this, but honestly I just wanted something that worked. Maybe I'll make something like |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-4375--docusaurus-2.netlify.app/classic/ |
# Conflicts: # packages/docusaurus-plugin-debug/package.json # packages/docusaurus-theme-common/package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM
This reduces the size of the core to 803 kilobytes, a save of 1.1 megabytes 🎉 🎉 |
Signed-off-by: Reece Dunham me@rdil.rocks
Motivation
Right now,
@docusaurus/core
is 1.36mb, which seems a bit big for just the core files. This reduces the size of a number of the packages by doing a number of things:To instead just import it from tslib, reducing code duplication.
.d.ts
files, which is just unneeded since the.d.ts
are generated in the first place. They are essentially their own source maps.Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Everything appears to be fine.
Related PRs
n/a