fix(admin): migrate tailwindcss config to v4 (#9940)

This commit is contained in:
Brooooooklyn
2025-02-05 11:09:57 +00:00
parent 14fbb8b059
commit 10233f1dbf
4 changed files with 386 additions and 28 deletions

View File

@@ -20,6 +20,7 @@
"@napi-rs/simple-git": "^0.1.19",
"@perfsee/webpack": "^1.13.0",
"@sentry/webpack-plugin": "^3.0.0",
"@tailwindcss/postcss": "^4.0.0",
"@vanilla-extract/webpack-plugin": "^2.3.15",
"autoprefixer": "^10.4.20",
"clipanion": "^3.2.1",

View File

@@ -255,25 +255,24 @@ export function createWebpackConfig(
loader: 'postcss-loader',
options: {
postcssOptions: {
plugins: [
cssnano({
preset: [
'default',
{
convertValues: false,
},
plugins: pkg.join('tailwind.config.js').exists()
? [
[
'@tailwindcss/postcss',
require(pkg.join('tailwind.config.js').value),
],
['autoprefixer'],
]
: [
cssnano({
preset: [
'default',
{
convertValues: false,
},
],
}),
],
}),
].concat(
pkg.join('tailwind.config.js').exists()
? [
require('tailwindcss')(
require(pkg.join('tailwind.config.js').value)
),
'autoprefixer',
]
: []
),
},
},
},