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

build: bundle dependencies #63

Merged
merged 2 commits into from
Feb 16, 2023
Merged

build: bundle dependencies #63

merged 2 commits into from
Feb 16, 2023

Conversation

privatenumber
Copy link
Collaborator

@privatenumber privatenumber commented Feb 16, 2023

Problem

Since this is a CLI, there will be use-cases where people use it with npx. Since npx re-installs the package every time, it. could be slow when the package or dependency tree is too large.

Changes

Bundle dependencies (which tree-shakes and keeps only what's used) and minify the bundle so it's as small as possible. This way, there is no dependency tree for npx to resolve, and the distribution size is as small as possible.

Comparison

Installing the main branch is 1.5 MB.
Installing this branch is 259 KB.

Copy link
Owner

@Nutlope Nutlope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nutlope Nutlope merged commit 23b580e into main Feb 16, 2023
@kcoderhtml kcoderhtml mentioned this pull request Feb 17, 2023
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