Skip to content

Commit

Permalink
Add postcss as a dependency of @tailwindcss/postcss (#14750)
Browse files Browse the repository at this point in the history
This PR adds `postcss` as a dependency of `@tailwindcss/postcss`. 

If you are in an environment with Next.js where you can use the
`@tailwindcss/postcss` package, then `postcss` is required.

If you have `postcss` in your `package.json`, then everything is fine,
however if you don't then you will get an error that `postcss` cannot be
found.

Note: this only happens when you are using `npm`, if you are using
`pnpm`, then the `postcss` package can be resolved correctly and you
won't run into issues. This is also why the integration tests just
worked (because we use `pnpm`).

To make sure that this package works for most people in most
environments, we explicitly add `postcss` as a dependency of
`@tailwindcss/postcss`.

---

I wanted to create an integration test for this to make sure this works,
but we are currently using `pnpm` with some of `pnpm`'s features to make
sure that we can override dependencies that point to `.tgz` files.
  • Loading branch information
RobinMalfait authored Oct 22, 2024
1 parent d2865c3 commit 557ed8c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow spaces spaces around operators in attribute selector variants ([#14703](https://github.com/tailwindlabs/tailwindcss/pull/14703))
- Ensure color opacity modifiers work with OKLCH colors ([#14741](https://github.com/tailwindlabs/tailwindcss/pull/14741))
- Ensure changes to the input CSS file result in a full rebuild ([#14744](https://github.com/tailwindlabs/tailwindcss/pull/14744))
- Add `postcss` as a dependency of `@tailwindcss/postcss` ([#14750](https://github.com/tailwindlabs/tailwindcss/pull/14750))
- _Upgrade (experimental)_: Migrate `flex-grow` to `grow` and `flex-shrink` to `shrink` ([#14721](https://github.com/tailwindlabs/tailwindcss/pull/14721))
- _Upgrade (experimental)_: Minify arbitrary values when printing candidates ([#14720](https://github.com/tailwindlabs/tailwindcss/pull/14720))
- _Upgrade (experimental)_: Ensure legacy theme values ending in `1` (like `theme(spacing.1)`) are correctly migrated to custom properties ([#14724](https://github.com/tailwindlabs/tailwindcss/pull/14724))
Expand Down
2 changes: 1 addition & 1 deletion packages/@tailwindcss-postcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"@tailwindcss/node": "workspace:^",
"@tailwindcss/oxide": "workspace:^",
"lightningcss": "catalog:",
"postcss": "^8.4.41",
"tailwindcss": "workspace:^"
},
"devDependencies": {
"@types/node": "catalog:",
"@types/postcss-import": "14.0.3",
"internal-example-plugin": "workspace:*",
"postcss": "^8.4.41",
"postcss-import": "^16.1.0"
}
}
33 changes: 9 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 557ed8c

Please sign in to comment.