Skip to content

Add support for Vite 8 in @tailwindcss/vite#19790

Merged
RobinMalfait merged 5 commits intomainfrom
feat/support-vite-8
Mar 12, 2026
Merged

Add support for Vite 8 in @tailwindcss/vite#19790
RobinMalfait merged 5 commits intomainfrom
feat/support-vite-8

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Mar 12, 2026

This PR adds support for Vite 8 when using the @tailwindcss/vite package.

From the package's perspective, not a lot had to change, just the vite peer dependency now has an additional ^8.0.0 version range.

Closes: #19789

Test plan

  1. Existing tests pass
  2. Manually tested in the ./playgrounds/vite playground
  3. Added Vite 8 integration tests to verify that the plugin works with Vite 8

@RobinMalfait RobinMalfait requested a review from a team as a code owner March 12, 2026 19:21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

Walkthrough

This pull request adds Vite 8 support to the Tailwind CSS Vite integration. The package peer dependency range is expanded to include ^8, the workspace catalog Vite entry is bumped to 8.0.0, and test suites are updated to include Vite 8 (including a parameterized SSR test covering ^5.3, ^6.0, ^7, and ^8). No public APIs or exported declarations were changed.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main objective: adding Vite 8 support to @tailwindcss/vite package.
Description check ✅ Passed The PR description clearly explains the changes made (peer dependency update), testing approach, and references the related issue #19789.
Linked Issues check ✅ Passed The PR fully addresses issue #19789 by adding ^8.0.0 to the vite peer dependency range, enabling Vite 8 compatibility and resolving installation failures.
Out of Scope Changes check ✅ Passed All changes are directly related to Vite 8 support: peer dependency update, SSR test refactoring for multi-version testing, workspace catalog bump, and test additions for Vite 8 validation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pnpm-workspace.yaml`:
- Line 11: The workspace dependency entry "vite: ^8.0.0" references an
unreleased Vite 8 and will break installs; change that entry to a stable release
(e.g., "vite: ^7.3.0" or "^7.3.1") or revert the line until Vite 8 is officially
released so pnpm can resolve the dependency; update the "vite: ^8.0.0" token
wherever it appears in the workspace config to the chosen stable version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b8462ef6-57e9-4502-8203-13e000a569ce

📥 Commits

Reviewing files that changed from the base of the PR and between dfc449c and 787ff4d.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • integrations/vite/index.test.ts
  • integrations/vite/ssr.test.ts
  • packages/@tailwindcss-vite/package.json
  • pnpm-workspace.yaml

Each test was the same except for the version. We can unwrap this again
if we need special handling for a specific version or introduce a
separate group, but for now, let's combine them.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
integrations/vite/ssr.test.ts (1)

4-4: Minor: Consider consistent version format for readability.

The version strings mix formats: ^5.3 and ^6.0 include minor versions, while ^7 and ^8 omit them. This is functionally correct but slightly inconsistent.

💅 Optional: Align version format
-describe.each([['^5.3'], ['^6.0'], ['^7'], ['^8']])('Using Vite %s', (version) => {
+describe.each([['^5.3'], ['^6.0'], ['^7.0'], ['^8.0']])('Using Vite %s', (version) => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@integrations/vite/ssr.test.ts` at line 4, The test matrix in the
describe.each call (test suite "Using Vite %s") mixes version string formats;
make them consistent by normalizing all entries to the same style (either
include a minor patch like '^7.0' and '^8.0' to match '^5.3'/'^6.0' or drop
minors from the first two to use '^5'/'^6' for parity). Update the array passed
to describe.each (the list of version strings) so every element follows the
chosen format to improve readability and consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@integrations/vite/ssr.test.ts`:
- Line 4: The test matrix in the describe.each call (test suite "Using Vite %s")
mixes version string formats; make them consistent by normalizing all entries to
the same style (either include a minor patch like '^7.0' and '^8.0' to match
'^5.3'/'^6.0' or drop minors from the first two to use '^5'/'^6' for parity).
Update the array passed to describe.each (the list of version strings) so every
element follows the chosen format to improve readability and consistency.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ac695073-5ced-4c71-8b93-878aa79939dd

📥 Commits

Reviewing files that changed from the base of the PR and between 3bf810f and 14603f9.

📒 Files selected for processing (1)
  • integrations/vite/ssr.test.ts

@RobinMalfait RobinMalfait merged commit 59b0329 into main Mar 12, 2026
9 checks passed
@RobinMalfait RobinMalfait deleted the feat/support-vite-8 branch March 12, 2026 19:54
@hansmbakker
Copy link

@RobinMalfait does this also deal with the changed LightningCSS behavior that is mentioned as a breaking change in https://stackoverflow.com/a/79879526?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support vite@8 by @tailwindcss/vite

2 participants