feat: auto-register extension dev servers with host#2220
Open
dschmidt wants to merge 1 commit intofeat/module-federationfrom
Open
feat: auto-register extension dev servers with host#2220dschmidt wants to merge 1 commit intofeat/module-federationfrom
dschmidt wants to merge 1 commit intofeat/module-federationfrom
Conversation
d63c892 to
02aefea
Compare
adb2b46 to
362d63c
Compare
Contributor
Author
|
A few minor things to improve: These names aren't great. I noticed that we detect when remotes/apps become stale, but if the Web Vite instance is restarted - apps never reregister.. |
7c32f22 to
4ab6bad
Compare
362d63c to
47be114
Compare
4ab6bad to
2419cca
Compare
47be114 to
bda2b29
Compare
2419cca to
8cb0109
Compare
4ace702 to
d91eff3
Compare
8cb0109 to
f496f9a
Compare
d91eff3 to
8b8c296
Compare
Remote extension dev servers automatically register themselves with the host dev server on startup. The host merges registered remotes into /config.json responses and triggers a browser reload. - Host: REST API at /_dev/apps (POST/DELETE/GET) with health check - Remote: registration plugin in extension-sdk with config watching - Config: reads manifest.json defaults + config.json overrides (deep merge) - Cleanup: host health check removes stale remotes every 10 seconds
8b8c296 to
42d3914
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remote extension dev servers automatically register themselves with the host dev server on startup — no more manual
config.jsonediting for dev.vite.config.ts): REST API at/_dev/apps(POST/DELETE/GET), health check every 10s, merges registered remotes into/config.jsonproxy response, triggers browser reload via HMRextension-sdk): Registration plugin posts to host onhttpServer.listening, watchessrc/manifest.jsonandsrc/config.jsonfor changes and re-registersmanifest.jsondefaults +config.jsonoverrides with deep merge (matches Go-side mergo behavior)How it works
pnpm vite(port 9201)pnpm vite(any port)src/manifest.jsonorsrc/config.json→ re-registers → browser reloads with new configConfiguration
overrides.hostUrlhttps://host.docker.internal:9201OPENCLOUD_WEB_HOST_URLenvDebug
Test plan