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
Problem
--trace-fileand--trace-dependencydo not say when a file or adependency comes from Module Federation.
Current behavior
For a file exposed through
exposes:Returns
is_entry_point: truewith nosourcefield.For a remote alias registered through
remotes:Returns
is_used: truewith no marker that the name is a ModuleFederation 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-fileon an exposed file adds asourcefield naming ModuleFederation and the config that exposes it.
--trace-dependencyon a remote alias adds a marker that the name is aModule Federation remote, not a package.
docs/backwards-compatibility.mdrecordsthem;
npm run generate:contracts:checkpasses.is unchanged.
Relevant files
crates/core/src/plugins/module_federation.rscrates/cli/srctrace command handling