-
Notifications
You must be signed in to change notification settings - Fork 114
Description
I'm using a pretty fresh Rails 8 app generated with rails new foo --css=tailwind
. The standard application.html.erb
includes the following:
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %>
The problem is that tailwindcss-rails
is adding CSS files to app/assets/builds/tailwind/whatever.css
, which are being automatically included.
I found the issue while tinkering with the experimental Engine support in tailwindcss-rails (which produced a file that shouldn't be served directly to customers, it needs to be added with an @import
to tailwind/application.css
), but I think it applies to anything that adds files to app/assets/builds/
.
On one hand, I can understand why it's including all CSS files in assets/
, but on the other hand, I don't think build files should be included. They're also treated differently in Rails' standard .gitignore
.
The work-around is to avoid using :all
or :app
so I'm not stuck, but I think this is unexpected behaviour, and I wanted to raise the issue here for awareness and discussion.