-
Notifications
You must be signed in to change notification settings - Fork 41
JIT fails to work with Vite #124
Comments
Same here! I just crated a project using Im using JIT |
Yeah, i hadnt even added Vue to my project @robdvins - no joy. Figure it was best to start from the basics before layering on the rest of my workflow. Tried a number of different options but still can't get the JIT watcher and vite to play nice-nice. Hoping it's an easy one @adamwathan - even if it's a "Do X to make it work and throwaway what you have" |
@adamwathan has this example of using vite with the jit engine https://github.com/adamwathan/tailwind-jit-vite-example |
Hey @gcavanunez , thanks - I'd had a look at that previously but as I hadn't use the Vue cli I wanted to understand how the basics of it tie together. It could just be the case it doesn't work outside of the defined setup at the moment 🤷♂️ |
@17twenty You're trying to make it a bit more complicated than it needs to be I think! I've created a PR that fixes your setup: 17twenty/leancanvas-tailwind-jit#1 The TL;DR is you don't need postcss-cli or anything, Vite has PostCSS support built in. |
What version of @tailwindcss/jit are you using?
0.1.4
What version of Node.js are you using?
v14.5.0
What browser are you using?
Chrome
What operating system are you using?
MacOS
Reproduction repository
https://github.com/17twenty/tailwind-jit-test
Setup a vite project (without adding Vue yet) and can't seem to get the JIT / watcher to work with vite.
Running gives:
but changing the
index.html
only triggers vite to reload, the watcher doesn't seem to work.Probably a misunderstanding of the docs on this repo but would love to get it working for a Vue project afterwards.
The text was updated successfully, but these errors were encountered: