Skip to content

Upgraded to Vite 8 - #29152

Merged
9larsons merged 1 commit into
mainfrom
steve/pla-96-vite8
Jul 7, 2026
Merged

9larsons merged 1 commit into
mainfrom
steve/pla-96-vite8

Conversation

@9larsons

@9larsons 9larsons commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

ref PLA-96

Moves every Vite-built app to Vite 8, which ships Rolldown (with Oxc + Lightning CSS) as its default bundler. The apps were already building with Rolldown via the transitional rolldown-vite@7.3.1 fork; Vite 8 makes that native, so the fork is no longer needed.

Changes

  • pnpm-workspace.yaml: bump the catalog vite 7.3.2 → 8.1.3 and delete the named rolldown catalog.
  • 13 apps: flip "vite": "catalog:rolldown" → "vite": "catalog:" (admin, admin-x-framework, admin-x-settings, admin-x-design-system, shade, posts, stats, activitypub, portal, comments-ui, sodo-search, signup-form, announcement-bar).
  • @vitejs/plugin-react 5.2.0 → 6.0.3 (Oxc-based, Babel-free) and swap apps/admin off @vitejs/plugin-react-swc onto @vitejs/plugin-react, removing the swc plugin entirely. Under Vite 8, @vitejs/plugin-react uses the Oxc Fast Refresh transform (@vitejs/plugin-react-oxc is deprecated in its favor), so admin keeps a Rust-fast HMR path and the whole repo runs a single React plugin.

vite@8.1.3 is pinned deliberately (≥ 8.0.16, past the advisory range in earlier 8.0.x).

Verification

  • Build: all 10 app projects (+ shared deps) build clean under Vite 8. Only warnings are pre-existing benign chunking notes in activitypub.
  • Admin React externals: react/react-dom stay external in the admin ES bundles (posts, stats, admin-x-settings) — the custom external-globals plugin still resolves them to the React/ReactDOM globals; no React inlined.
  • Public UMD apps: 0 leaked require( / module.exports / import.meta.glob; bundle sizes unchanged (portal 2360 KB, comments-ui 828 KB, sodo-search 264 KB, signup-form 252 KB, announcement-bar 132 KB).
  • Tests: comments-ui 252/252 unit tests pass (Vitest transforms under Vite 8; React handling under plugin-react v6 intact).

Plugin compatibility

  • @vitejs/plugin-react@6.0.3 peers vite: ^8.0.0 and ships no Babel (Oxc only); every react() call site is bare (no Babel options), so nothing hits v6's dropped-Babel-options break.
  • vitest@4.1.9, vite-plugin-svgr@4.5.0, vite-plugin-css-injected-by-js@3.5.2, @tailwindcss/vite@4.2.2, and @storybook/react-vite@10.4.6 all already declare ^8 in their Vite peer ranges — no further bumps required.

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@nx-cloud

nx-cloud Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 167af8f

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 11m 1s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run-many -t test:unit -p @tryghost/activityp... ✅ Succeeded 7m 42s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 4s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 37s View ↗
nx run @tryghost/admin:build ✅ Succeeded 3m 22s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 46s View ↗
nx run-many -t lint -p @tryghost/activitypub,@t... ✅ Succeeded 2m 55s View ↗
Additional runs (7) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-07 16:44:25 UTC

@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The workspace catalog updates vite to 8.1.3 and @vitejs/plugin-react to 6.0.3, and removes the rolldown catalog mapping. Multiple app package.json files change their vite devDependency from catalog:rolldown to catalog:. In apps/admin, the React plugin package changes from @vitejs/plugin-react-swc to @vitejs/plugin-react, and the Vite config import is updated accordingly.

Possibly related PRs

  • TryGhost/Ghost#29138: Also updates the shared pnpm-workspace.yaml catalog for @vitejs/plugin-react.

Suggested reviewers: acburdine

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the main change: upgrading the repo to Vite 8.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the Vite 8 upgrade and related dependency updates.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steve/pla-96-vite8

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pnpm-workspace.yaml`:
- Line 126: The public UMD app builds are still inheriting Vite 8’s default
build target instead of the project support matrix. Update the Vite config used
by the UMD apps to set an explicit build.target, and verify any CJS default
imports still work under Vite 8’s stricter interop. Use the relevant Vite config
entrypoints for the public apps, not browserslist, so the target is enforced
during bundling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f410a4a6-da5c-4b15-9f8e-41e4b7c64b25

📥 Commits

Reviewing files that changed from the base of the PR and between cc7d72d and 12aaeb5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • apps/activitypub/package.json
  • apps/admin-x-design-system/package.json
  • apps/admin-x-framework/package.json
  • apps/admin-x-settings/package.json
  • apps/admin/package.json
  • apps/announcement-bar/package.json
  • apps/comments-ui/package.json
  • apps/portal/package.json
  • apps/posts/package.json
  • apps/shade/package.json
  • apps/signup-form/package.json
  • apps/sodo-search/package.json
  • apps/stats/package.json
  • pnpm-workspace.yaml

Comment thread pnpm-workspace.yaml Resolved
@codecov

codecov Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.31%. Comparing base (cc7d72d) to head (167af8f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29152      +/-   ##
==========================================
+ Coverage   74.26%   74.31%   +0.04%     
==========================================
  Files        1566     1566              
  Lines      135737   135737              
  Branches    16448    16465      +17     
==========================================
+ Hits       100806   100869      +63     
+ Misses      33901    33865      -36     
+ Partials     1030     1003      -27     
Flag Coverage Δ
admin-tests 55.16% <ø> (-0.02%) ⬇️
e2e-tests 76.46% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons 9larsons changed the title Changed all apps to build with Vite 8 (Rolldown built in) Upgraded to Vite 8 Jul 7, 2026
ref https://linear.app/ghost/issue/PLA-96

- bumps the catalog `vite` to 8.1.3 and removes the named `rolldown` catalog; all
  13 Vite-built apps go back to plain `catalog:`. Vite 8 ships Rolldown as its
  default bundler, so the transitional rolldown-vite fork is no longer needed
- bumps @vitejs/plugin-react 5.2.0 -> 6.0.3 (Oxc-based, Babel-free) and swaps
  apps/admin from @vitejs/plugin-react-swc onto @vitejs/plugin-react, dropping the
  swc plugin. Under Vite 8, plugin-react uses the Oxc Fast Refresh transform, so
  admin keeps fast HMR and the whole repo runs one react plugin
- verified: all apps build under Vite 8; react/react-dom stay external in the admin
  bundles; public UMD apps have 0 require/module leaks and byte-parity sizes;
  comments-ui 252 unit tests pass
@9larsons
9larsons force-pushed the steve/pla-96-vite8 branch from 12aaeb5 to 167af8f Compare July 7, 2026 16:30
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@9larsons
9larsons enabled auto-merge (squash) July 7, 2026 16:31
@9larsons
9larsons disabled auto-merge July 7, 2026 16:38
@9larsons
9larsons enabled auto-merge (squash) July 7, 2026 16:40
@9larsons
9larsons merged commit 34b5072 into main Jul 7, 2026
48 checks passed
@9larsons
9larsons deleted the steve/pla-96-vite8 branch July 7, 2026 16:47
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.

1 participant