Skip to content

Commit a2abc42

Browse files
author
David Heinemeier Hansson
committed
Document the need for assets:clobber at the moment
1 parent 3901b59 commit a2abc42

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ The last option adds the purger compressor to `config/environments/production.rb
1616

1717
You can do both things yourself, if you've changed the default setup.
1818

19+
20+
## Purging in production
21+
22+
The Tailwind CSS framework starts out as a massive file, which gives you all the combinations of utility classes for development, but you wouldn't want to ship all those unused classes in production. So this gem includes a Sprockets compressor that purges the tailwind file from all those unused classes.
23+
24+
This happens automatically on `assets:precompile`, which should always be part of a deployment path, but is not currently compatible with the default sprockets cache. So you must run the `assets:clobber` task prior to `assets:precompile` when deploying to production, or new new usage of additional utility classes from your view and helper files will not be updated.
25+
26+
27+
## Configuration
28+
1929
If you need to customize what files are searched for class names, you need to replace the compressor line with something like:
2030

2131
```ruby

0 commit comments

Comments
 (0)