Skip to content

Commit 057e2cb

Browse files
committed
Register dependencies with Sprockets to enable cache invalidation
1 parent 16aed84 commit 057e2cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/tailwindcss/compressor.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def initialize(options = {})
1414
end
1515

1616
def call(input)
17-
{ data: Tailwindcss::Purger.purge(input[:data], keeping_class_names_from_files: @options[:files_with_class_names]) }
17+
{
18+
data: Tailwindcss::Purger.purge(input[:data], keeping_class_names_from_files: @options[:files_with_class_names]),
19+
dependencies: @options[:files_with_class_names].map { |f| "file-digest://#{f.to_path}" }.to_set
20+
}
1821
end
1922
end

0 commit comments

Comments
 (0)