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

Commit 0727e7b

Browse files
committed
Update error message when apply can't find class
1 parent 16d6e20 commit 0727e7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/expandApplyAtRules.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ function expandApplyAtRules(context) {
5959
let siblings = []
6060
let applyCandidates = apply.params.split(/[\s\t\n]+/g)
6161
for (let applyCandidate of applyCandidates) {
62-
// TODO: Check for user css rules?
6362
if (!context.classCache.has(applyCandidate)) {
64-
throw new Error('Utility does not exist!')
63+
throw new Error(
64+
`The ${applyCandidate} class does not exist. If it's a custom class, make sure it is defined within a \`@layer\` directive.`
65+
)
6566
}
6667

6768
let rules = context.classCache.get(applyCandidate)

0 commit comments

Comments
 (0)