From 9cd0301b0af16fb40acbe71443ab4d4f20346167 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 30 Mar 2023 18:42:38 +0200 Subject: [PATCH] Drop `@tailwindcss/line-clamp` warning (#10915) * drop `@tailwindcss/line-clamp` check This won't work in places where `require` calls are hoisted so that they become static imports. This means that in some projects this `require` call was breaking the full application even though it was intentionally put in a try/catch block... * update changelog --- CHANGELOG.md | 1 + src/util/normalizeConfig.js | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e73dc309a188..1b40827804e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Try resolving `config.default` before `config` to ensure the config file is resolved correctly ([#10898](https://github.com/tailwindlabs/tailwindcss/pull/10898)) - Pull pseudo elements outside of `:is` and `:has` when using `@apply` ([#10903](https://github.com/tailwindlabs/tailwindcss/pull/10903)) - Update the types for the `safelist` config ([#10901](https://github.com/tailwindlabs/tailwindcss/pull/10901)) +- Drop `@tailwindcss/line-clamp` warning ([#10915](https://github.com/tailwindlabs/tailwindcss/pull/10915)) ## [3.3.0] - 2023-03-27 diff --git a/src/util/normalizeConfig.js b/src/util/normalizeConfig.js index 1c8c93db1c5d..7e1a592decda 100644 --- a/src/util/normalizeConfig.js +++ b/src/util/normalizeConfig.js @@ -297,22 +297,5 @@ 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', [ - '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.', - ]) - - config.plugins = config.plugins.filter((p) => p !== plugin) - } - } - return config }