Skip to content

Commit 8a8671b

Browse files
committed
mark tailwindcss as a peerDependency
Internally we are using tailwindcss/plugin, but we don't mark it as a peerDependency or a normal dependency in our package.json. This means that this plugin will fail in a monorepo environment when dependnecies get hoisted. This is because now there is no link to tailwind itself. Marking it as a peerDependency should fix this, because now there is a link. People that already have tailwind installed are good to go. People that use monorepo's should benefit from this additional information. Side note: NPM 7 starts installing peerDependencies for us https://github.com/npm/rfcs/blob/latest/implemented/0025-install-peer-deps.md which is nice, because if we added an `explicit` dependency to Tailwind, then we would always reference our dependency and not the user's dependency. Closes: #31
1 parent 98f7619 commit 8a8671b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
"scripts": {
1717
"prepublishOnly": "node scripts/build.js"
1818
},
19+
"peerDependencies": {
20+
"tailwindcss":">=2.0.0"
21+
},
1922
"devDependencies": {
2023
"autoprefixer": "^10.0.2",
2124
"clean-css": "^4.2.1",
2225
"postcss": "^8.1.7",
23-
"tailwindcss": "^2.0.0-alpha.23"
26+
"tailwindcss": "^2.0.3"
2427
},
2528
"dependencies": {
2629
"mini-svg-data-uri": "^1.2.3"

0 commit comments

Comments
 (0)