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

Code-split default config out #42

Merged
merged 6 commits into from
Oct 21, 2021

Conversation

dcastil
Copy link
Owner

@dcastil dcastil commented Oct 21, 2021

The config makes the by far biggest chunk of the library. If someone uses createTailwindMerge without using the default config, they are importing a lot of dead code.

A bundle-size test using yarn build:min in this repo yields following results:

Compression With getDefaultConfig() Without getDefaultConfig() Diff
GZip 4.72 kB 1434 B -3.29 kB / -69.6 %
Brotli 4.19 kB 1305 B -2.89 kB / -68.9 %

So I think the breaking change is definitely worth it.

@github-actions github-actions bot added breaking Is breaking change feature Is new feature labels Oct 21, 2021
@dcastil dcastil added the needs changelog edit Needs edit in changelog before release label Oct 21, 2021
@dcastil dcastil merged commit a97b265 into main Oct 21, 2021
@dcastil dcastil deleted the breaking-feature/code-split-default-config-out branch October 21, 2021 08:41
@dcastil dcastil changed the title Breaking: Code-split default config out Code-split default config out Oct 21, 2021
@dcastil dcastil removed the needs changelog edit Needs edit in changelog before release label Oct 21, 2021
@dcastil dcastil added the context-v0 Related to tailwind-merge v0 label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Is breaking change context-v0 Related to tailwind-merge v0 feature Is new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant