Skip to content

Commit ca7e38a

Browse files
committed
feat: upgrade Tailwind CSS from v3 to v4
1 parent 3594798 commit ca7e38a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+580
-602
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
"@git-diff-view/file": "workspace:*",
3939
"@rollup/plugin-alias": "^5.1.1",
4040
"@swc/core": "^1.10.15",
41+
"@tailwindcss/postcss": "^4.0.0",
4142
"@types/lodash": "^4.17.20",
4243
"@types/node": "^22.18.10",
4344
"@types/react": "^18.3.26",
4445
"@types/react-dom": "^18.3.7",
45-
"autoprefixer": "^10.4.21",
4646
"dts-bundle-generator": "^9.5.1",
4747
"eslint": "^8.57.0",
4848
"husky": "^8.0.2",
@@ -54,7 +54,7 @@
5454
"prettier-plugin-tailwindcss": "^0.6.14",
5555
"project-tool": "https://github.com/MrWangJustToDo/project-tool.git",
5656
"rollup-plugin-postcss": "^4.0.2",
57-
"tailwindcss": "^3.4.18",
57+
"tailwindcss": "^4.0.0",
5858
"ts-node": "^10.9.2",
5959
"tslib": "^2.8.0",
6060
"typescript": "^5.9.3"

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
"use-sync-external-store": "^1.6.0"
7777
},
7878
"devDependencies": {
79+
"@tailwindcss/postcss": "^4.0.0",
7980
"@types/use-sync-external-store": "^1.5.0",
80-
"autoprefixer": "^10.4.21",
8181
"postcss": "^8.5.6",
8282
"react": "^19.2.0",
83-
"tailwindcss": "^3.4.18"
83+
"tailwindcss": "^4.0.0"
8484
},
8585
"peerDependencies": {
8686
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",

packages/react/postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { resolve } = require("path");
33
module.exports = {
44
plugins: {
55
"postcss-import": {},
6-
tailwindcss: { config: resolve(__dirname) + "/tailwind.config.js" },
6+
"@tailwindcss/postcss": {},
77
"postcss-prefix-selector": {
88
prefix: ".diff-tailwindcss-wrapper",
99
transform: function (prefix, selector, prefixedSelector, _filePath, rule) {
@@ -35,6 +35,5 @@ module.exports = {
3535
}
3636
},
3737
},
38-
autoprefixer: {},
3938
},
4039
};

packages/react/src/_base.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";

packages/react/src/_base_pure.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
@tailwind components;
2-
@tailwind utilities;
1+
@import "tailwindcss/utilities";

packages/react/tailwind.config.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/solid/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
"reactivity-store": "^0.3.12"
5050
},
5151
"devDependencies": {
52-
"solid-js": "^1.9.0",
53-
"vite-plugin-solid": "^2.11.0",
54-
"autoprefixer": "^10.4.21",
52+
"@tailwindcss/postcss": "^4.0.0",
5553
"eslint-plugin-solid": "^0.14.5",
5654
"postcss": "^8.5.6",
57-
"tailwindcss": "^3.4.18",
55+
"solid-js": "^1.9.0",
56+
"tailwindcss": "^4.0.0",
5857
"vite": "^5.4.20",
59-
"vite-plugin-dts": "^4.5.4"
58+
"vite-plugin-dts": "^4.5.4",
59+
"vite-plugin-solid": "^2.11.0"
6060
},
6161
"peerDependencies": {
6262
"solid-js": "^1.9.0"

packages/solid/postcss.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
plugins: {
33
"postcss-import": {},
4-
tailwindcss: { config: "./tailwind.config.js" },
4+
"@tailwindcss/postcss": {},
55
"postcss-prefix-selector": {
66
prefix: ".diff-tailwindcss-wrapper",
77
transform: function (prefix, selector, prefixedSelector, _filePath, rule) {
@@ -33,6 +33,5 @@ export default {
3333
}
3434
},
3535
},
36-
autoprefixer: {},
3736
},
3837
};

packages/solid/src/_base.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";

packages/solid/src/_base_pure.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
@tailwind components;
2-
@tailwind utilities;
1+
@import "tailwindcss/utilities";

0 commit comments

Comments
 (0)