-
Nice and useful library, many thanks for this effort. It would be useful to have a CDN version available to make it work in conjunction with tailwind JIT on CDN. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @bakman2! 👋 Interesting idea! What's your use case for this where using a CDN version would be more convenient than using the npm package? Also, do you use some JS lib CDNs? I never used one, so I don't have a lot of experience in this space. |
Beta Was this translation helpful? Give feedback.
-
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> |
Beta Was this translation helpful? Give feedback.
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: