Skip to content

Changed public UMD apps to build with Rolldown via rolldown-vite#29141

Merged
9larsons merged 1 commit into
mainfrom
steve/pla-96-f1-public-apps-rolldown
Jul 7, 2026
Merged

Changed public UMD apps to build with Rolldown via rolldown-vite#29141
9larsons merged 1 commit into
mainfrom
steve/pla-96-f1-public-apps-rolldown

Conversation

@9larsons

@9larsons 9larsons commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

ref PLA-96

Builds Ghost's public UMD apps — portal, comments-ui, sodo-search, signup-form, announcement-bar — with Rolldown via rolldown-vite@7.3.1 instead of stock Vite (Rollup + esbuild).

Changes

  • Point the 5 public apps' vite dependency at catalog:rolldown (npm:rolldown-vite@7.3.1).
  • Remove build.rollupOptions.output.manualChunks: false from apps/portal/vite.config.mjs — Rolldown rejects the false literal, and it was redundant (UMD lib mode emits a single chunk regardless).

Verification

All 5 apps build clean under Rolldown:

App Rolldown UMD Notes
portal 2,360 KB
comments-ui 828 KB
sodo-search 264 KB umd/main.css still emitted
signup-form 252 KB
announcement-bar 132 KB
  • 0 leaked require( / module.exports / import.meta.glob in any bundle.
  • Per-namespace locale bundling intact — each app ships only its own namespace's translations (all 62 locales), verified by a string-presence matrix across bundles.
  • UMD bundle sizes match the prior stock-Vite builds (within ±3%, minifier noise).

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR makes small manifest and configuration adjustments across several apps: comments-ui gains an unpkg entry, signup-form's publishConfig now specifies an explicit npm registry URL, and portal's vite config drops a manualChunks: false Rollup override. Additionally, announcement-bar, portal, and sodo-search package.json files receive formatting-only normalization with no semantic changes.

Changes

Cohort / File(s) Summary
comments-ui package.json Added unpkg field pointing to UMD bundle
signup-form package.json Added explicit npm registry to publishConfig
portal vite.config.mjs Removed manualChunks: false override in build config
announcement-bar, portal, sodo-search package.json Formatting/whitespace normalization only

Sequence Diagram(s)

Not applicable — changes are configuration/manifest edits without an observable runtime flow.

Possibly related PRs

  • TryGhost/Ghost#28973: Also modifies apps/portal/vite.config.mjs, removing related dead preview/esbuild configuration.
  • TryGhost/Ghost#28976: Migrates portal's vite config to the shared publicAppViteConfig flow where manualChunks is configured via overrides.

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 summarizes the main change: migrating public UMD apps to Rolldown via rolldown-vite.
Description check ✅ Passed The description matches the changeset, covering the Rolldown migration and the portal manualChunks removal.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steve/pla-96-f1-public-apps-rolldown

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.

9larsons added a commit that referenced this pull request Jul 7, 2026
ref https://linear.app/ghost/issue/PLA-96

- adds a `rolldown` named catalog (vite: npm:rolldown-vite@7.3.1) and points the 8
  admin-surface apps (posts, stats, admin, admin-x-framework, admin-x-settings,
  admin-x-design-system, shade, activitypub) at catalog:rolldown
- public UMD apps stay on stock vite until their own Rolldown config lands (#29141)
- the known Rolldown interop breakers are already fixed on main: shade Flag ESM
  swap (#29139), @svg-maps/world shim (#29143), @tryghost/i18n dual-format (#29144)
- verified: all 8 apps + the admin shell build clean under Rolldown; react/react-dom
  stay external (no dual-instance regression); only benign bundler-agnostic warnings
@9larsons 9larsons force-pushed the steve/pla-96-f1-public-apps-rolldown branch from 4cf1441 to 0d0d524 Compare July 7, 2026 15:36
@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 0d0d524

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 9m 41s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 41s View ↗
nx run-many -t test:unit -p @tryghost/announcem... ✅ Succeeded 6m 53s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 55s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 59s View ↗
nx run @tryghost/admin:build ✅ Succeeded 3m 6s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 33s 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 15:53:01 UTC

@9larsons 9larsons changed the title Migrated public UMD apps to rolldown-vite Migrated public apps to rolldown Jul 7, 2026
@9larsons 9larsons marked this pull request as ready for review July 7, 2026 15:38
@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.

ref https://linear.app/ghost/issue/PLA-96

- points the 5 public apps (portal, comments-ui, sodo-search, signup-form,
  announcement-bar) at catalog:rolldown (npm:rolldown-vite@7.3.1)
- removes portal's rollupOptions.output.manualChunks:false — Rolldown rejects the
  false literal and it is redundant (UMD lib mode emits a single chunk)
- verified: all 5 build clean under Rolldown; 0 require/module leaks; per-namespace
  locale scoping intact; UMD sizes match the stock-Vite builds
@9larsons 9larsons force-pushed the steve/pla-96-f1-public-apps-rolldown branch from 0d0d524 to ab6342b Compare July 7, 2026 15:39
@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 changed the title Migrated public apps to rolldown Changed public UMD apps to build with Rolldown via rolldown-vite Jul 7, 2026
@9larsons 9larsons enabled auto-merge (squash) July 7, 2026 15:46
@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.26%. Comparing base (7d9f285) to head (ab6342b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29141      +/-   ##
==========================================
- Coverage   74.26%   74.26%   -0.01%     
==========================================
  Files        1566     1566              
  Lines      135737   135737              
  Branches    16444    16446       +2     
==========================================
- Hits       100805   100804       -1     
  Misses      33932    33932              
- Partials     1000     1001       +1     
Flag Coverage Δ
admin-tests 55.16% <ø> (-0.02%) ⬇️
e2e-tests 76.41% <ø> (+<0.01%) ⬆️

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 merged commit cc7d72d into main Jul 7, 2026
48 checks passed
@9larsons 9larsons deleted the steve/pla-96-f1-public-apps-rolldown branch July 7, 2026 15:55
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