fix: add missing backstage.features filed for standard Module federation assets#136
Open
davidfestal wants to merge 6 commits into
Open
fix: add missing backstage.features filed for standard Module federation assets#136davidfestal wants to merge 6 commits into
backstage.features filed for standard Module federation assets#136davidfestal wants to merge 6 commits into
Conversation
…ation assets Assisted-by: Cursor Signed-off-by: David Festal <dfestal@redhat.com>
Signed-off-by: David Festal <dfestal@redhat.com>
- Documented the addition of the missing `backstage.features` field in generated `dist-dynamic/package.json` files for standard Module Federation asset generation. 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>
|
jonkoops
approved these changes
Jul 9, 2026
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