Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Commit 921cee9

Browse files
committed
Invalidate stylesheet cache if applies increase cache size
1 parent 7c1e53e commit 921cee9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/expandApplyAtRules.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ function expandApplyAtRules(context) {
1818

1919
// Start the @apply process if we have rules with @apply in them
2020
if (applies.length > 0) {
21+
let classCacheCount = context.classCache.size
22+
2123
// Fill up some caches!
2224
generateRules(context.tailwindConfig, applyCandidates, context)
2325

26+
if (context.classCache.size > classCacheCount) {
27+
context.stylesheetCache = null
28+
}
29+
2430
/**
2531
* When we have an apply like this:
2632
*

0 commit comments

Comments
 (0)