Skip to content
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
WIP
  • Loading branch information
RobinMalfait committed Mar 30, 2023
commit d0c7fa3ccff0a3872c63d8ac4dde62129fd1ee82
18 changes: 18 additions & 0 deletions src/util/normalizeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,23 @@ export function normalizeConfig(config) {
}
}

// Warn if the line-clamp plugin is installed
try {
let pkg = require(require('path').resolve(process.cwd(), 'package.json'))
if (
('tailwindcss' in pkg.dependencies ||
'tailwindcss' in pkg.devDependencies ||
'tailwindcss' in pkg.peerDependencies) &&
('@tailwindcss/line-clamp' in pkg.dependencies ||
'@tailwindcss/line-clamp' in pkg.devDependencies ||
'@tailwindcss/line-clamp' in pkg.peerDependencies)
) {
log.warn('line-clamp-in-core', [
'As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.',
'Remove it from the `plugins` array in your configuration to eliminate this warning.',
])
}
} catch {}

return config
}