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

chore: remove UMD build #252

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

benmccann
Copy link
Contributor

This file is not referred to in the package.json. Removing it will make the package about 30% smaller

@antfu
Copy link
Collaborator

antfu commented Jun 15, 2023

We still mention it in the CDN usage: https://github.com/Rich-Harris/magic-string#installation
I don't think we should remove it

@benmccann benmccann changed the title chore: remove unused UMD build chore: remove UMD build Jun 15, 2023
@benmccann
Copy link
Contributor Author

Ah, you're right. Still I wonder if we can't remove it the next time we cut a breaking release which would be the next minor version since we're still pre-1.0 (i.e. 0.30.0). I can't imagine a usecase where you'd use it via a CDN. I expect the vast majority of users use it via npm. Any users who do use it via a CDN could change to build their bundles via npm before deploying.

The reason I'm interested in reducing package size is that learn.svelte.dev loads the Svelte compiler's dependencies from npm into the browser. The smaller those dependencies are the faster the tutorial will load. With Svelte v4 we're really slimming down the dependencies - I've already gotten it from 61 down to 16. All of Rich's other package are quite small as they've been updated to distribute only the ESM source. magic-string is the largest of his packages because it distributes three versions and sourcemaps for all of them where the sourcemaps are 2x the size of the code itself.

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.

None yet

2 participants