refactor(v2): TS config update: reduce the size of npm modules#4375
Merged
slorber merged 6 commits intofacebook:masterfrom Mar 17, 2021
RDIL:typescript-bundle-improvements
Merged
refactor(v2): TS config update: reduce the size of npm modules#4375slorber merged 6 commits intofacebook:masterfrom RDIL:typescript-bundle-improvements
slorber merged 6 commits intofacebook:masterfrom
RDIL:typescript-bundle-improvements
Conversation
RDIL
commented
Mar 9, 2021
|
[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.
Contributor
Author
|
@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
Contributor
Author
|
This reduces the size of the core to 803 kilobytes, a save of 1.1 megabytes 🎉 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Reece Dunham me@rdil.rocks
Motivation
Right now,
@docusaurus/coreis 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.tsfiles, which is just unneeded since the.d.tsare 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