Repository navigation
Add support for Vite 8 in @tailwindcss/vite - #19790
Conversation
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
integrations/vite/index.test.tsintegrations/vite/ssr.test.tspackages/@tailwindcss-vite/package.jsonpnpm-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.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
integrations/vite/ssr.test.ts (1)
4-4: Minor: Consider consistent version format for readability.The version strings mix formats:
^5.3and^6.0include minor versions, while^7and^8omit 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
📒 Files selected for processing (1)
integrations/vite/ssr.test.ts
|
@RobinMalfait does this also deal with the changed LightningCSS behavior that is mentioned as a breaking change in https://stackoverflow.com/a/79879526? |
|
it is merged but still not released yet to use in with vite@8 |
|
@MrBns you can use the insiders version tag of tailwindcss |
…er dep - Pin tailwindcss and @tailwindcss/vite to insiders build 0.0.0-insiders.a4be983 (Vite 8 support merged in tailwindlabs/tailwindcss#19790 but not yet in a stable release) - Add vue-eslint-parser@^10 as devDependency (now a peer dep of eslint-plugin-vue 10, previously bundled as a regular dep) - Both insiders pins are temporary — revert to ^4 once a stable Tailwind release ships with vite ^8 in peer deps All CI checks pass locally: lint, type-check, 458 tests, build, audit.
@tailwindcss/vite 4.1.x only supports vite ^5.2.0 || ^6 || ^7. Vite 8 support was added in 4.2.2 via tailwindlabs/tailwindcss#19790. https://claude.ai/code/session_01NrZ2h3jXqwAzd1Mx1Und4f
@tailwindcss/vite 4.2.4 claims vite ^8 peer support but fails at runtime with 'Missing field tsconfigPaths on BindingViteResolvePluginConfig.resolveOptions' because the internal resolve API changed in rolldown bundled with vite 8. The fix (tailwindlabs/tailwindcss#19790, #19803) is only in the insiders channel. Update all tailwind packages to insiders: - @tailwindcss/vite: 4.2.4 -> 0.0.0-insiders.f62597a - @tailwindcss/postcss: 4.2.4 -> 0.0.0-insiders.f62597a - tailwindcss: 4.2.4 -> 0.0.0-insiders.f62597a Pin to the exact insiders hash to avoid accidental drift. Revert to stable once 4.3+ ships with the fix.

This PR adds support for Vite 8 when using the
@tailwindcss/vitepackage.From the package's perspective, not a lot had to change, just the
vitepeer dependency now has an additional^8.0.0version range.Closes: #19789
Test plan
./playgrounds/viteplayground