Skip to content

CDN version ? #144

Answered by dcastil
bakman2 asked this question in Ideas
Sep 28, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hey @bakman2! 👋

I just discovered that you can use tailwind-merge with a CDN already. Skypack provides a CDN that should work for most npm packages meant for the browser, including tailwind-merge.

E.g. you can add this code to an HTML file to use tailwind-merge:

<script type="module">
    import { twMerge } from 'https://cdn.skypack.dev/tailwind-merge@%5E1.12.0?min'
    console.log(twMerge('p-3 p-4'))
    // → logs 'p-4'
</script>

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@bakman2
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dcastil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
context-v1 Related to tailwind-merge v1
2 participants