You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Upgrading from Tailwind CSS v… when running upgrade tool (#19026)
This PR adds a bit more information when running the upgrade tool to
know what version of Tailwind CSS you're upgrading from. This will help
users and maintainers when things go wrong.
Will have another PR up soon that errors when the Tailwind CSS version
in package.json and node_modules don't match.
### Test plan
Ran this one one of our older projects and saw the version logged
correctly.
<img width="1055" height="363" alt="image"
src="https://github.com/user-attachments/assets/5cbf4c52-ea0f-42c8-bd55-5bae2ed511de"
/>
Copy file name to clipboardExpand all lines: packages/@tailwindcss-postcss/README.md
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,29 +62,29 @@ By default, this plugin detects whether or not the CSS is being built for produc
62
62
If you want to always enable or disable Lightning CSS the `optimize` option may be used:
63
63
64
64
```js
65
-
import tailwindcss from "@tailwindcss/postcss"
65
+
import tailwindcss from '@tailwindcss/postcss'
66
66
67
67
export default {
68
-
plugins: [
69
-
tailwindcss({
70
-
// Enable or disable Lightning CSS
71
-
optimize: false,
72
-
})
73
-
]
68
+
plugins: [
69
+
tailwindcss({
70
+
// Enable or disable Lightning CSS
71
+
optimize: false,
72
+
}),
73
+
],
74
74
}
75
75
```
76
76
77
77
It's also possible to keep Lightning CSS enabled but disable minification:
78
78
79
79
```js
80
-
import tailwindcss from "@tailwindcss/postcss"
80
+
import tailwindcss from '@tailwindcss/postcss'
81
81
82
82
export default {
83
-
plugins: [
84
-
tailwindcss({
85
-
optimize: { minify: false },
86
-
})
87
-
]
83
+
plugins: [
84
+
tailwindcss({
85
+
optimize: { minify: false },
86
+
}),
87
+
],
88
88
}
89
89
```
90
90
@@ -95,32 +95,32 @@ Our PostCSS plugin can rewrite `url(…)`s for you since it also handles `@impor
95
95
In some situations the bundler or framework you're using may provide this feature itself. In this case you can set `transformAssetUrls` to `false` to disable this feature:
96
96
97
97
```js
98
-
import tailwindcss from "@tailwindcss/postcss"
98
+
import tailwindcss from '@tailwindcss/postcss'
99
99
100
100
export default {
101
-
plugins: [
102
-
tailwindcss({
103
-
// Disable `url(…)` rewriting
104
-
transformAssetUrls: false,
105
-
106
-
// Enable `url(…)` rewriting (the default)
107
-
transformAssetUrls: true,
108
-
})
109
-
]
101
+
plugins: [
102
+
tailwindcss({
103
+
// Disable `url(…)` rewriting
104
+
transformAssetUrls: false,
105
+
106
+
// Enable `url(…)` rewriting (the default)
107
+
transformAssetUrls: true,
108
+
}),
109
+
],
110
110
}
111
111
```
112
112
113
113
You may also pass options to `optimize` to enable Lighting CSS but prevent minification:
114
114
115
115
```js
116
-
import tailwindcss from "@tailwindcss/postcss"
116
+
import tailwindcss from '@tailwindcss/postcss'
117
117
118
118
export default {
119
-
plugins: [
120
-
tailwindcss({
121
-
// Enables Lightning CSS but disables minification
122
-
optimize: { minify: false },
123
-
})
124
-
]
119
+
plugins: [
120
+
tailwindcss({
121
+
// Enables Lightning CSS but disables minification
0 commit comments