AvanzaCast/packages/landing-page/postcss.config.cjs

19 lines
561 B
JavaScript

module.exports = {
plugins: (() => {
// Tailwind v4 changed the PostCSS plugin distribution to @tailwindcss/postcss
// Try to require it first, otherwise fall back to the older 'tailwindcss' package name
let tailwindPlugin
try {
tailwindPlugin = require('@tailwindcss/postcss')
} catch (e) {
// fallback for environments still using the legacy package name
tailwindPlugin = require('tailwindcss')
}
return {
[tailwindPlugin.name || 'tailwindcss']: tailwindPlugin(),
autoprefixer: {},
}
})(),
}