Closed rmehner closed 3 years ago
Hey @rmehner. If there's no node_modules
and no config file then unfortunately the extension will not work. It looks like tailwindcss-rails
has recently added support for Webpacker, and if you use that method the extension works great, providing you create a tailwind.config.js
file 👍
I appreciate that isn't really a solution (especially if you don't want to use Webpacker), but I don't think we will be able to support the asset pipeline version of tailwindcss-rails
, sorry!
@bradlc thank you :) Being more of a JS person, the Webpacker version felt natural to me anyway, but wanted to know if this something the extension could have as an option, but I don't know the inner workings.
Either way, thank you very much for taking your time to reply and investigate and have a great weekend!
I'm having the same issue with my Rails project using esbuild. I have the config.js and node_modules.
Yesterday, I had to remove the container-queries plugin because this was breaking tailwind intellisense. However, today it's not working again and it's not due to the plugins.
The CSS tips are awesome and I dont' want to use Tailwind without it! What should I do to keep this working well?
I found the output to the Tailwind CSS IntelliSense and for an unknown reason it seems stuck on "Building...". What would could cause this?
The Tailwind CSS IntelliSense plugin now has an experimental feature that is working for me with tailwind-rails.
Documented here: https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
tl;dr In .vscode/settings.json ...
{ "tailwindCSS.experimental.configFile": "config/tailwind.config.js" }
All I had to do was setup my settings.json properly. For anyone who is having issues just follow the steps outlined in this write-up: https://spaquet.medium.com/tailwind-css-autocomplete-in-vscode-with-ruby-on-rails-63a5fc24a1a4
👋 ,
This is more of a question than an issue. I've been toying around with https://github.com/rails/tailwindcss-rails the other day and while it's working perfectly fine, the VSCode extension does not work, since with this there is no tailwind entry in the package.json and also no tailwind config in the project root. It's all hidden within the gem.
I was wondering what the supposed escape hatch for this would be, do you have any ideas? Current workaround would be to replicate the config within the project root and add tailwind to the package.json, even though it's not used. Is there any other way?