Skip to content

Commit ca01891

Browse files
authored
fix(cli): Tell yarn not to install Tailwind types (they're deprecated) (#12049)
For some reason [@types](https://github.com/types)`/tailwindcss` started getting installed when setting up TW. Those types are deprecated and should not be included. See [https://github.com/cedarjs/cedar/pull/152](https://github.com/cedarjs/cedar/pull/152) for more context
1 parent b741b13 commit ca01891

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

__fixtures__/test-project/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@types/react": "^18.2.55",
2525
"@types/react-dom": "^18.2.19",
2626
"autoprefixer": "^10.4.21",
27-
"postcss": "^8.5.3",
27+
"postcss": "^8.5.6",
2828
"postcss-loader": "^8.1.1",
2929
"prettier-plugin-tailwindcss": "^0.5.12",
3030
"tailwindcss": "^3.4.17"

packages/cli/src/commands/setup/ui/libraries/tailwindcss.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ export const handler = async ({ force, install }) => {
171171
['workspace', 'web', 'add', '-D', ...webWorkspacePackages],
172172
{
173173
cwd: rwPaths.base,
174+
env: {
175+
// See https://github.com/cedarjs/cedar/pull/152 for
176+
// context
177+
YARN_TS_ENABLE_AUTO_TYPES: 'false',
178+
},
174179
},
175180
)
176181
},

0 commit comments

Comments
 (0)