Skip to content

Add "Import Chain" into hoverstate for module.Β #269

@TheLarkInn

Description

@TheLarkInn

Feature description

Currently there is no way to see "why did this module end up in my bundle". It is one of the next actionable items for a developer to solve when they are triaging their JavaScript bundles.

Today, the webpack stats object does provide this information through an API attached to the module called issuerPath. module.issuerPath will provide an array of modules that caused the current module to be imported or added to the bundle.

For example if module c was imported by b and b was imported by a: The issuerPath for module c will be [{id: a}, {id: b}] (always starting with the entry).

I believe that we should display this information when a developer hover's over the module in question they are curious about.

I spent some time last Friday to explore the ./client app which would drive the UI in the analyzer and it looks like the data is "massaged" in a way that extra data noise is removed from the "moduletree data".

Work involved would be: add issuerPath as a property on Module on the anaylseStats fn/side of the app, and then include markup in the ModuleTree to incorporate this feature.
...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions