Skip to content

Commit 7d6d0af

Browse files
committed
Add more detail to @apply errors
1 parent 0751431 commit 7d6d0af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/substituteClassApplyAtRules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function findMixin(css, mixin, onError) {
2424

2525
if (_.isEmpty(matches)) {
2626
// prettier-ignore
27-
onError(`\`@apply\` cannot be used with ${mixin} because ${mixin} either does not exist, or it's actual definition includes a pseudo-class like :hover, :active, etc.`)
27+
onError(`\`@apply\` cannot be used with \`${mixin}\` because \`${mixin}\` either cannot be found, or it's actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that \`${mixin}\` exists, make sure that any \`@import\` statements are being properly processed *before* Tailwind CSS sees your CSS, as \`@apply\` can only be used for classes in the same CSS tree.`)
2828
}
2929

3030
if (matches.length > 1) {

0 commit comments

Comments
 (0)