Use bundled tailwind nesting plugin

See documentation at:
https://tailwindcss.com/docs/using-with-preprocessors#nesting
This commit is contained in:
Mattias Granlund 2023-07-14 09:44:37 +02:00
parent e5d8282339
commit 8a6314eb27
3 changed files with 2 additions and 5 deletions

View File

@ -72,7 +72,6 @@
"nanoid": "^4.0.2",
"postcss": "^8.4.25",
"postcss-load-config": "^4.0.1",
"postcss-nested": "^6.0.1",
"posthog-js": "^1.70.2",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",

View File

@ -163,9 +163,6 @@ devDependencies:
postcss-load-config:
specifier: ^4.0.1
version: 4.0.1(postcss@8.4.25)
postcss-nested:
specifier: ^6.0.1
version: 6.0.1(postcss@8.4.25)
posthog-js:
specifier: ^1.70.2
version: 1.70.2

View File

@ -1,10 +1,11 @@
const tailwindcss = require('tailwindcss');
const autoprefixer = require('autoprefixer');
const nested = require('tailwindcss/nesting');
const config = {
plugins: [
//Makes it easier to define .dark theme classes
require('postcss-nested'),
nested,
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//But others, like autoprefixer, need to run after,