Skip to content

Externalize react UI#3

Merged
BAJ- merged 4 commits intomainfrom
externalize-react-ui
Apr 7, 2026
Merged

Externalize react UI#3
BAJ- merged 4 commits intomainfrom
externalize-react-ui

Conversation

@BAJ-
Copy link
Copy Markdown
Owner

@BAJ- BAJ- commented Apr 7, 2026

UI Serving Refactor:

  • The uiPlugin now serves the Observatory UI at /__observatory using a virtual module for both JS and CSS, generating the HTML response on the fly instead of serving static files from disk

Build System Updates:

  • The Vite build config (vite.config.ui.ts) is updated to produce a single JS and CSS bundle (observatory-ui.js and observatory-ui.css) as a library build, with React and related packages externalized for runtime resolution.

@BAJ- BAJ- self-assigned this Apr 7, 2026
@BAJ- BAJ- requested a review from Copilot April 7, 2026 13:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors how the Observatory React UI is served by the Vite plugin by switching from disk-served static assets to virtual modules, and updates the UI build to emit a single JS/CSS bundle with React externalized for runtime resolution.

Changes:

  • Updated uiPlugin to serve /__observatory via a virtual JS module and on-the-fly HTML generation (with CSS inlined).
  • Updated the UI Vite build to produce observatory-ui library output and externalize React-related dependencies.
  • Added a changelog documenting the UI serving and bundling changes.
Show a summary per file
File Description
vite.config.ui.ts Switches UI build to a lib build output and externalizes React dependencies for host resolution.
src/plugin/uiPlugin.ts Replaces static file serving with virtual-module JS delivery and generated HTML (inlining built CSS).
CHANGELOG.md Documents the UI serving refactor and React externalization.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment thread src/plugin/uiPlugin.ts
@BAJ- BAJ- merged commit a0b75e0 into main Apr 7, 2026
1 check passed
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