mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Improve error message for missing variant
This commit is contained in:
parent
7de73459b6
commit
93cddddaa0
@ -78,6 +78,9 @@ export default function(config, { variantGenerators: pluginVariantGenerators })
|
||||
}
|
||||
|
||||
_.forEach(_.without(ensureIncludesDefault(variants), 'responsive'), variant => {
|
||||
if (!variantGenerators[variant]) {
|
||||
throw new Error(`Your config mentions the "${variant}" variant, but "${variant}" doesn't appear to be a variant. Did you forget or misconfigure a plugin that supplies that variant?`);
|
||||
}
|
||||
variantGenerators[variant](atRule, config)
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user