diff --git a/src/index.js b/src/index.js index 7077fba..28d2b69 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,7 @@ const semver = require('semver') const tailwindPkg = require('tailwindcss/package.json') const plugin = require('tailwindcss/plugin') +const log = require('tailwindcss/lib/util/log').default const baseStyles = { overflow: 'hidden', @@ -11,13 +12,10 @@ const baseStyles = { const lineClamp = plugin( function ({ matchUtilities, addUtilities, theme, variants }) { if (semver.gte(tailwindPkg.version, '3.3.0')) { - console.log( - `\u001b[31m${[ - '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.', - ].join('\n')}\u001b[0m` - ) - + 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.', + ]) return }