Skip to content

Cleaned up dead Vite config and added forwardConsole - #29164

Merged
9larsons merged 2 commits into
mainfrom
steve/vite-config-cleanup
Jul 7, 2026
Merged

Cleaned up dead Vite config and added forwardConsole#29164
9larsons merged 2 commits into
mainfrom
steve/vite-config-cleanup

Conversation

@9larsons

@9larsons 9larsons commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Post-Vite-8 config tidy that keeps vite-tsconfig-paths in place (it's load-bearing for cross-package @src resolution when admin imports stats/posts source).

Changes

  • apps/admin-x-framework/src/vite.ts: remove build.commonjsOptions — no-op under Vite 8 (Rolldown handles CJS natively).
  • apps/comments-ui/vite.config.mts: remove the empty build.rollupOptions.output block.
  • apps/admin/vite.config.ts: add server.forwardConsole: { logLevels: ['warn','error'] } — browser console warnings/errors surface in the dev-server terminal.

Verification

admin + comments-ui + a framework consumer (posts) build clean; comments-ui UMD unchanged (0 leaked require(/module.exports). vite-tsconfig-paths intentionally untouched.

no ref

- removes build.commonjsOptions from the admin-x-framework vite factory and the
  empty build.rollupOptions.output in comments-ui — both no-ops under Vite 8
  (Rolldown handles CJS natively)
- adds server.forwardConsole (warn/error) to apps/admin so browser console
  warnings/errors surface in the dev-server terminal
- leaves vite-tsconfig-paths in place (it's load-bearing for cross-package @src
  resolution when admin imports stats/posts source)
- verified: admin + comments-ui + a framework consumer build clean; comments-ui
  UMD unchanged, 0 require/module leaks
@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 baa39e0

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 10m 28s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run @tryghost/admin:build ✅ Succeeded 46s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-f... ✅ Succeeded 57s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 49s View ↗
nx run @tryghost/comments-ui:test:acceptance ✅ Succeeded 35s View ↗
nx run ghost:build:assets ✅ Succeeded 2s View ↗
nx run-many -t lint -p @tryghost/admin-x-framew... ✅ Succeeded 19s View ↗
Additional runs (2) ✅ 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 20:31:35 UTC

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9a5b2a8c-7622-43f0-b20c-ef71f64456b1

📥 Commits

Reviewing files that changed from the base of the PR and between f2ff084 and baa39e0.

📒 Files selected for processing (1)
  • apps/admin/vite.config.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/admin/vite.config.ts

Walkthrough

This change updates Vite configuration in three apps. The shared admin-x-framework config removes build.commonjsOptions. The comments-ui config removes an empty build.rollupOptions.output override. The admin config adds commented notes and a commented server.forwardConsole example for forwarding warn and error logs.

Changes

  • apps/admin-x-framework/src/vite.ts: removed build.commonjsOptions
  • apps/comments-ui/vite.config.mts: removed empty build.rollupOptions.output
  • apps/admin/vite.config.ts: added commented server.forwardConsole documentation

Possibly related PRs

  • TryGhost/Ghost#28976: Related to the comments-ui Vite config cleanup that removes the empty build.rollupOptions.output override.
  • TryGhost/Ghost#29155: Related because it makes the same Vite cleanup changes to admin-x-framework and comments-ui.
  • TryGhost/Ghost#29158: Related to the admin-x-framework build.commonjsOptions removal, but in the opposite direction.

Suggested reviewers: acburdine

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the Vite config cleanup and the new forwardConsole addition.
Description check ✅ Passed The description clearly matches the changesets and explains the Vite 8 config cleanup and console forwarding update.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steve/vite-config-cleanup

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.

- Vite 8 already forwards browser console warn/error to the terminal when it
  detects an AI agent is driving the dev server, and stays quiet for humans, so
  an explicit always-on setting only adds terminal noise for human devs
- kept commented as a documented reminder of the opt-in and its tradeoff
@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 merged commit 657f1f3 into main Jul 7, 2026
43 checks passed
@9larsons
9larsons deleted the steve/vite-config-cleanup branch July 7, 2026 20:50
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.

2 participants