#How to use TailwindCSS on Handlebars? Help tailwindcss CLI working with .html but not .handlebars

1 messages · Page 1 of 1 (latest)

stable maple
idle dirge
#

can you try adding handlebars file "./views/**/*.handlebars" to contents in your tailwind config

stable maple
#

Yes I have done that previously, I put in hbs and handlebars but not working?

#

See screenshot @idle dirge maybe I am missing something here?

stable maple
idle dirge
#

are you using vite or any other build tool?

stable maple
native relic
#

or you can manually edit your settings.json config file.
my preferred method!

Ctrl Shift P enter Open User Settings (JSON)

add this (edit to suit your needs):

  "tailwindCSS.includeLanguages": {
    "plaintext": "html, vue, css, js, astro, md, svg"
  },
native relic
#

oh, forgot to mention, you do need the TailwindCSS VS Code extension.

stable maple
#

Added the includeLanguages to my settings (json). Not working. and yes I have the Tailwind CSS IntelliSense extensions already if that is what you are talking about.

stable maple
native relic
#
module.exports = {
  content: ['./views/partials/*.handlebars', './views/*.handlebars'],
   ...
#

is that what you have in your tailwind.config?

#

i just re-read your post.

hhmm 🤔

stable maple
#

This is what my current tailwind.config.js looks like. ^

#

The content path works because in that same dir I put in a .html file and added some styles on it and when I check on liveserver it works fine but for whatever reason it doesn't work with .handlebars