JS API for cdn.tailwindcss.com or versions? #6956
Replies: 2 comments
-
Sorry can you explain what you're asking in more detail? I don't know what "JS API for cdn.tailwindcss.com or versions?" means. If you're asking about how to pin versions, that's already possible, you'll notice that https://cdn.tailwindcss.com already redirects to an immutable URL: |
Beta Was this translation helpful? Give feedback.
-
Regarding versions... Woo! Good to know. Regarding JS API... Sorry was sending quick mobile message. This functionality is awesome! I knew JIT existed, but I didn't realize you all had an official version running completely in-browser. I missed it on the new v3 announcement. Very cool. Is this the same project/code from this a while ago or new official version or quasi-deal?
For a JS API, was hoping to do something like this: <script type="module">
import * as tailwindCDN from './node_modules/tailwind/esm/tailwindcdn.min.js'
let code = `
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
`
tailwindCDN.squish({
html: code
}).then(() => { ... })
</script> Just curious the plan with the library support-wise from the official team, docs, etc.? Understand doing stuff like this outside build system is niche and probably not priority. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What’s the plan with this? Keep just for playground stuff?
Beta Was this translation helpful? Give feedback.
All reactions