To use TailwindCSS, I need to have Node.js and npm in order to install it via npm install tailwindcss @tailwindcss/cli.
However, I don't have the option to use Node.js and npm, so I'm looking for a workaround that would allow me to use the Tailwind CLI without having to install Node.js and npm.
I tried loading the tailwindcss.js file available from CDN servers as a module script, but I wasn't successful.
<script type="module">
import tailwindcss from 'https://cdn.skypack.dev/pin/[email protected]/mode=imports/optimized/tailwindcss.js';
</script>
Is it possible to use TailwindCSS without Node.js and npm?
You can use tailwind CDN. Add these following lines to the <head></head> tag of your HTML page
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.0.2/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
</head>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With