-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tailwindcss): fix TailwindCSS pack not loading when using tailwindcss-rails Ruby Gem #915
fix(tailwindcss): fix TailwindCSS pack not loading when using tailwindcss-rails Ruby Gem #915
Conversation
The tailwindcss-rails Ruby gem keeps the config at config/tailwind.config.js https://github.com/rails/tailwindcss-rails
Review ChecklistDoes this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist: Proper conventional commit scoping:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sorry about that! This actually made me go look at the docs and it seems custom config location and names are supported: https://tailwindcss.com/docs/configuration#using-a-different-file-name. We could consider adding a statement to check package.json for a Thoughts? @mehalter @natematykiewicz |
No problem. I sort of wish they didn’t change the default location of the config. But I also get it, every other Rails config is in the The Ruby gem doesn’t use package.json. It includes a compiled executable and some Ruby config. It actually exists for Rails apps that want to use Tailwind but have no other need for NodeJS. |
FWIW, the official Tailwind guides mention this config file. |
And... Elixir Phoenix projects put the tailwind config at assets/tailwind.config.js. https://github.com/phoenixframework/tailwind Could not figure out what broke, and had to go digging. 🤷♂️ I'll put up a PR shortly. |
See also AstroNvim#915 Phoenix projects put the tailwind.config.js file in the root /assets folder. The addition of specific root dir detection in AstroNvim#912 broke the elixir-phoenix pack.
📑 Description
#912 caused the Tailwind LSP to not work, when using the tailwindcss-rails Ruby gem.
The tailwindcss-rails Ruby gem keeps the config at config/tailwind.config.js, which is not in the new
root_dir
config.https://github.com/rails/tailwindcss-rails?tab=readme-ov-file#configuration-and-commands