Skip to content

Commit 2b3c846

Browse files
author
David Heinemeier Hansson
committed
Note you can configure where class names are looked for
1 parent d74a0ad commit 2b3c846

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ This gem just gives access to the standard Tailwind CSS framework. If you need t
1414

1515
The last option adds the purger compressor to `config/environments/production.rb`. This ensures that when `assets:precompile` is called during deployment that the unused class names are not included in the tailwind output css used by the app. It also adds a `javascript_link_tag` to your `app/views/application.html.erb` file.
1616

17+
If you need to customize what files are searched for class names, you need to replace the compressor line with something like:
18+
19+
```ruby
20+
config.assets.css_compressor = Tailwindcss::Compressor.new(files_with_class_names: Rails.root.glob("app/somehere/**/*.*"))
21+
```
22+
1723

1824
## License
1925

0 commit comments

Comments
 (0)