feat: migrate Module Federation host to backoffice modularity manifest endpoint#228
Open
maksimzinchuk wants to merge 8 commits into
Open
feat: migrate Module Federation host to backoffice modularity manifest endpoint#228maksimzinchuk wants to merge 8 commits into
maksimzinchuk wants to merge 8 commits into
Conversation
Replace POST /api/frontend-modules with GET /api/apps/{appId}/manifest,
remove humanizeRange + semver compat filter, adopt AppManifestResponse
contract with entry/remote/exposed mapping. Add manifestUrl override
option and defaultManifestUrl/buildEntryUrl/stripLeadingDotSlash helpers.
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-228Or pin to the exact commit: npm install @vc-shell/framework@2.0.4-pr228.1e79eaePublished packages (dist-tag
|
…ontract The platform's PluginRemote.exposed defaults to './Module' (capital M), see AppManifestService.DefaultExposedModule in vc-platform. The previous default './module' (lowercase) caused 'Module ./Module does not exist in container' on every plugin remote load — because MF runtime matches exposed keys by exact string comparison. Aligning the convention removes the need for per-plugin overrides. Authors who exposed './module' explicitly are unaffected (their explicit options.exposes wins). Authors who relied on the default need to ensure their host loader requests './Module' from the manifest's remote.exposed.
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
Migrates
@vc-shell/mf-hostand@vc-shell/mf-moduleto the platform's new Backoffice Modularity Framework (vc-platform#3019).mf-host: switches fromPOST /api/frontend-modulesto canonicalGET /api/apps/{appId}/manifest. Drops client-side semver/compatibleWith filtering, theprovidespayload, and thesemverruntime dep. Adds optionalmanifestUrloverride. Unifiedwarn + skippolicy for any non-OK HTTP response (401/403/404/5xx).mf-module: adds three optionalDynamicModuleOptionsfields —appId,moduleRoot,remoteName— so plugin builds land at<moduleRoot>/plugins/<appId>/remoteEntry.jswhere the platform manifest expects them. LegacyoutDir: dist/mfpreserved whenappIdis absent.framework/core/api/platform.ts: regenerated NSwag client now exposesAppManifestResponse,PluginEntry,ContentFile,PluginRemote.mf-hostimports types from@vc-shell/framework— single source of truth.Design:
docs/superpowers/specs/2026-05-20-mf-modularity-migration-design.mdPlan:
docs/superpowers/plans/2026-05-20-mf-modularity-migration.mdCompatibility matrix
mf-hostPOST /api/frontend-modulesaliasNo major version bump (per-project policy: not treated as breaking for internal consumers).
Test plan
yarn workspace @vc-shell/mf-host test— 24/24 ✓yarn workspace @vc-shell/mf-module test— 26/26 ✓yarn typecheck— cleanyarn lint— cleanyarn check:circular— cleanyarn check:layers— cleanfrontend-modules/humanizeRange/compatibleWith/REGISTRY_URL/semverinpackages/mf-host/srcorpackages/mf-module/srcExternal consumer migrations (separate PRs)
Six external repos consume the legacy
@vc-shell/mf-modulecontract — each gets its own PR per team cadence. Spec §13 lists them with migration template (appId,moduleRoot,remoteName):vc-module-marketplace-commissions-1vc-module-import-1vc-module-marketplace-quotevc-module-marketplace-registrationvc-module-marketplace-reviews-1vc-module-marketplace-communicationDeferred follow-ups (non-blocking)
vee-validateversion resolution from(VeeValidate as any).version ?? "4.0.0"toimport veeValidatePkg from "vee-validate/package.json"for consistency.router.replacepost-install navigation, empty-plugins performance-marks path, malformed-JSON catch path.contentFiles[]style injection if a plugin starts emitting standalone CSS (currently vc-shell remotes inline CSS via federation).