import-tree

import-tree(WIP)

A super fast tool that uses swc to build JavaScript/TypeScript module import/require-relation tree.

Features

Usage

import-tree is not only a cli tool, you can also use it as a JavaScript API or a specific bundler plugin.

Benchmark

import-tree tested its Nodejs api’s benchmark in multiple popular third-party git repos.

System:
  OS: macOS 13.6
  CPU: (12) arm64 Apple M2 Pro
  Memory: 68.25 MB / 16.00 GB
  Shell: 3.2.57 - /bin/sh
Binaries:
  Node: 18.17.1 
  Yarn: 1.22.19 
  npm: 9.6.7 
  pnpm: 8.8.0 
repo file type total files import links import depth ops/sec average time(ns)
axios@1.6.2 .js 59 132 3 81 12,249,262.50
rxjs@8.0.0-alpha.12 .ts 205 877 3 2 351,465,279.17

Roadmap

v0.1.x [WIP]