Skip to content

Module Federation: name the source in trace output #2796

Description

@BartWaardenburg

Problem

--trace-file and --trace-dependency do not say when a file or a
dependency comes from Module Federation.

Current behavior

For a file exposed through exposes:

fallow dead-code --trace-file src/Button.tsx --format json --quiet

Returns is_entry_point: true with no source field.

For a remote alias registered through remotes:

fallow dead-code --trace-dependency checkout --format json --quiet

Returns is_used: true with no marker that the name is a Module
Federation remote rather than an npm package.

Expected behavior

Both trace commands name Module Federation as the source when that is why
the file or the dependency is credited.

Acceptance criteria

  • --trace-file on an exposed file adds a source field naming Module
    Federation and the config that exposes it.
  • --trace-dependency on a remote alias adds a marker that the name is a
    Module Federation remote, not a package.
  • Both fields are additive; docs/backwards-compatibility.md records
    them; npm run generate:contracts:check passes.
  • A trace on a file or a dependency with no Module Federation involvement
    is unchanged.
  • CHANGELOG entry.

Relevant files

  • crates/core/src/plugins/module_federation.rs
  • crates/cli/src trace command handling

Activity

  1. added
    area:cliCommand-line interface behavior
    area:pluginsFramework/external plugin system
    type:uxHuman-facing clarity or workflow improvement
    priority:lowDeferred cleanup, blocked dependency work, or nice-to-have
    on Sep 23, 2026
  2. added a commit that references this issue on Sep 24, 2026
    1e4acc2
  3. added a commit that references this issue on Sep 25, 2026
    4dc965c
  4. BartWaardenburg commented on Sep 26, 2026

    @BartWaardenburg
    CollaboratorAuthor

    Released in v3.29.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCommand-line interface behaviorarea:pluginsFramework/external plugin systempriority:lowDeferred cleanup, blocked dependency work, or nice-to-havetype:uxHuman-facing clarity or workflow improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions