From c6c55bd7667047a4921838f5963fdb15a72af9ef Mon Sep 17 00:00:00 2001 From: Diego Aquino Date: Sat, 25 Jan 2025 20:10:57 -0300 Subject: [PATCH] refactor(examples): migrate to tailwind v4 --- examples/with-next-js-app/package.json | 3 +- examples/with-next-js-app/postcss.config.mjs | 2 +- .../src/components/Button.tsx | 2 +- .../with-next-js-app/src/components/Input.tsx | 2 +- .../with-next-js-app/src/styles/global.css | 4 +- examples/with-next-js-app/tailwind.config.ts | 11 - examples/with-next-js-pages/package.json | 3 +- .../with-next-js-pages/postcss.config.mjs | 2 +- .../src/components/Button.tsx | 2 +- .../src/components/Input.tsx | 2 +- .../with-next-js-pages/src/styles/global.css | 4 +- .../with-next-js-pages/tailwind.config.ts | 11 - examples/with-playwright/package.json | 3 +- examples/with-playwright/postcss.config.mjs | 2 +- .../with-playwright/src/components/Button.tsx | 2 +- .../with-playwright/src/components/Input.tsx | 2 +- .../with-playwright/src/styles/global.css | 22 +- examples/with-playwright/tailwind.config.ts | 11 - pnpm-lock.yaml | 528 ++++++++++-------- 19 files changed, 341 insertions(+), 277 deletions(-) delete mode 100644 examples/with-next-js-app/tailwind.config.ts delete mode 100644 examples/with-next-js-pages/tailwind.config.ts delete mode 100644 examples/with-playwright/tailwind.config.ts diff --git a/examples/with-next-js-app/package.json b/examples/with-next-js-app/package.json index de973e9b..b576f2aa 100644 --- a/examples/with-next-js-app/package.json +++ b/examples/with-next-js-app/package.json @@ -24,13 +24,14 @@ }, "devDependencies": { "@playwright/test": "^1.50.0", + "@tailwindcss/postcss": "^4.0.0", "@types/node": "^22.10.10", "@types/react": "^19.0.8", "@types/react-dom": "^19.0.3", "dotenv-cli": "^8.0.0", "execa": "^9.5.2", "postcss": "^8.5.1", - "tailwindcss": "^3.4.17", + "tailwindcss": "^4.0.0", "tsx": "^4.19.2", "typescript": "^5.7.3", "zimic": "latest" diff --git a/examples/with-next-js-app/postcss.config.mjs b/examples/with-next-js-app/postcss.config.mjs index 1a69fd2a..5d6d8457 100644 --- a/examples/with-next-js-app/postcss.config.mjs +++ b/examples/with-next-js-app/postcss.config.mjs @@ -1,7 +1,7 @@ /** @type {import('postcss-load-config').Config} */ const config = { plugins: { - tailwindcss: {}, + '@tailwindcss/postcss': {}, }, }; diff --git a/examples/with-next-js-app/src/components/Button.tsx b/examples/with-next-js-app/src/components/Button.tsx index 007b1d0b..e81a8ab6 100644 --- a/examples/with-next-js-app/src/components/Button.tsx +++ b/examples/with-next-js-app/src/components/Button.tsx @@ -8,7 +8,7 @@ function Button({ className, children, ...rest }: Props) {