fix: add missing backstage.features filed for standard Module federation assets#136
Merged
Merged
Conversation
jonkoops
approved these changes
Jul 9, 2026
gashcrumb
approved these changes
Jul 20, 2026
…ation assets Assisted-by: Cursor Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com> Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
davidfestal
force-pushed
the
add-backstage-features-to-dynamic-plugin
branch
from
July 20, 2026 13:28
426b6f3 to
0956f21
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
Implements RHIDP-15376.
Upstream Backstage's
backstage-cli packnow populatesbackstage.featuresinpackage.jsonby analyzing each entry point's default export$$typeviats-morph. Since rhdh-cli's forkedproductionPackpredates that addition, this PR adds the same detection as a separate step during frontend dynamic plugin export.When
--generate-module-federation-assetsis enabled (the default), the export command now:ts-morphproject and reads the package's entry points@backstage/FrontendPlugin)backstage.featuresin the outputpackage.jsonChanges
src/commands/export-dynamic-plugin/features.ts—detectBackstageFeatures()utility mirroring upstream's detection logicsrc/commands/export-dynamic-plugin/frontend.ts— integrates feature detection and injects results via theaftercallback ofcustomizeForDynamicUse()scripts/backstage-types-config.json— added type extraction config fortypeDistProjectandentryPointsmodulessrc/generated/backstage-cli-types.d.ts— now includes type declarations for the new internal modulespackage.json— addedts-morphas a peer dependency (provided transitively by@backstage/cli-module-build)backstage.featuresis populated for frontend pluginsTest plan
rhdh-cli plugin export-dynamicon a frontend plugin producesbackstage.featureswith correct feature typesbackstage.featuresassertionsyarn tscpasses