Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn when @tailwindcss/line-clamp plugin is being used #10862

Merged
merged 6 commits into from
Mar 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Warn if line-clamp plugin is installed
  • Loading branch information
thecrypticace committed Mar 22, 2023
commit f7911f330681878b0343c1e014c1d665dcbd5f49
15 changes: 15 additions & 0 deletions src/util/normalizeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,20 @@ export function normalizeConfig(config) {
}
}

// Warn if the line-clamp plugin is installed
if (config.plugins.length > 0) {
let plugin
try {
plugin = require('@tailwindcss/line-clamp')
} catch {}

if (plugin && config.plugins.includes(plugin)) {
log.warn('line-clamp-in-core', [
`The @tailwindcs/line-clamp plugin is now part of Tailwind CSS v3.3`,
`Remove it from your config to silence this warning`,
])
}
}

return config
}