Trace Import
trace_importTrace import chains from entry points to identify why a module is bundled, showing dependency paths and unminified webpack module size. Requires webpack stats loaded first.
Instructions
Explain why a module is bundled by tracing its import chain from an entry point to the module. moduleSizeBytes is the unminified webpack module size, not emitted chunk size. Requires load_webpack_stats first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"buildId": "<buildId>",
"moduleName": "<moduleName>"
},
"name": "trace_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum matching modules to trace. Defaults to 10. | |
| buildId | Yes | Build ID returned by load_build_stats | |
| moduleName | Yes | Module or package name to search for (case-insensitive substring), e.g. "lodash" |