tailwind-merge 0.8.0
Summary
This is a big release with breaking changes. These were necessary to improve the API before the coming v1.0.0 release and to add better plugin support. If you feel like writing a plugin, check out the plugins section in the docs!
Breaking Changes
- Previously there was a list of prefixes in the tailwind-merge config which was used to match Tailwind prefixes. I removed those and match all prefixes as valid Tailwind prefixes. This is only a breaking change if you use non-Tailwind classes with
:in them which look like Tailwind classes after the prefix. tailwind-merge will treat those as Tailwind classes and resolve conflicts incorrectly. (https://github.com/dcastil/tailwind-merge/pull/50) createTailwindMerge- If you added custom prefixes to your tailwind-merge config, you can remove them now. If you use TypeScript, you need to remove them. (https://github.com/dcastil/tailwind-merge/pull/50)
- Doesn't get passed the
getDefaultConfigcallback anymore. You need to call the exported functiongetDefaultConfiginstead to get the default config. (https://github.com/dcastil/tailwind-merge/pull/42) - You probably don't need
createTailwindMergeanyway. Use the new and much simpler to useextendTailwindMergeinstead. (https://github.com/dcastil/tailwind-merge/pull/49)
New Features
- Add plugin documentation by @dcastil in https://github.com/dcastil/tailwind-merge/pull/51
- (Breaking change) Consider all prefixes as valid Tailwind prefixes by @dcastil in https://github.com/dcastil/tailwind-merge/pull/50
- Add
extendTailwindMergefunction by @dcastil in https://github.com/dcastil/tailwind-merge/pull/49 - Add
mergeConfigsfunction by @dcastil in https://github.com/dcastil/tailwind-merge/pull/45 - (Breaking change) Code-split default config out by @dcastil in https://github.com/dcastil/tailwind-merge/pull/42
- Enable multiple
createConfigfunctions by @dcastil in https://github.com/dcastil/tailwind-merge/pull/40 - Add validators to package exports by @dcastil in https://github.com/dcastil/tailwind-merge/pull/38
Bug Fixes
- Remove unwated side effects when mutating default config by @dcastil in https://github.com/dcastil/tailwind-merge/pull/43
- Also added the
Configtype to the package exports
- Also added the
Full Changelog: https://github.com/dcastil/tailwind-merge/compare/v0.7.1...v0.8.0