-
Notifications
You must be signed in to change notification settings - Fork 186
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
v4.0.0-rc2 - application.tailwind.css is not ignored by propshaft when using :app or :all flag in stylesheet_link_tag helper #477
Comments
🤔 This was originally fixed in 31621ea, but something I did in the meantime made this regress. Will investigate. |
Darn, this is the change that needs to be made, I used diff --git a/lib/tailwindcss/engine.rb b/lib/tailwindcss/engine.rb
index 0c020bbc..7b88c5f1 100644
--- a/lib/tailwindcss/engine.rb
+++ b/lib/tailwindcss/engine.rb
@@ -6,7 +6,7 @@ class Engine < ::Rails::Engine
Rails.application.config.generators.stylesheets = false
end
- initializer "tailwindcss.exclude_asset_path", after: "propshaft.append_assets_path" do
+ initializer "tailwindcss.exclude_asset_path", before: "propshaft.append_assets_path" do
if Rails.application.config.assets.excluded_paths # the app may not be using Propshaft
Rails.application.config.assets.excluded_paths << Rails.root.join("app/assets/tailwind")
end |
Indeed, i fixed the issue adding |
I think I had tested the original fix on a Rails 7 upgraded app. 🤦 In any case: #479 will fix this and I'll cut another RC release today. |
@flavorjones just tried with rc3 but the issue still persists. but if I add |
@EricGusmao OK, then I need help reproducing what you're seeing. A stock rails 8 app generated by the |
@flavorjones It's working fine, it was a problem on my end, sorry. |
I am using rails 8.0.1, and after following the steps here using V4.0.0-rc2, the behaviour reported at #470 still persists. The script is running fine, the file moved directories, but it still is compiled and served by propshaft.
This happen due to propshaft
stylesheet_link_tag
helper Reference.I just noticed the rake task to upgrade just removes the former stylesheet entry and keeps
So all the assets that ends with
.css
are served.But If you also remove the line above and add (as the install script):
The tailwind unprocessed file is ignored and not served.
The text was updated successfully, but these errors were encountered: