export-size
Analysis bundle cost for each export of an ESM package
Install
npx export-size [package-name]
Usage
Calculate local package
npx export-size .
Calculate npm package
npx export-size @vueuse/core
More options
npx export-size --help
Example output
@vueuse/core v4.0.0-beta.20
sha 8ef798bf7d22f9cca7681c3bb717af59e6b1685d
βββββββββββββββββββββββββββββ¬βββββββββββ
β export β min+gzip β
β β β
β useWebWorkerFn β 1.1 KB β
β useTransition β 1007 B β
β useParallax β 987 B β
β asyncComputed β 924 B β
β useShare β 817 B β
β useIdle β 651 B β
β useSessionStorage β 604 B β
β useLocalStorage β 600 B β
β useStoragePlain β 597 B β
β useStorage β 586 B β
β useDeviceMotion β 559 B β
β useMouseInElement β 542 B β
β useElementVisibility β 503 B β
β useDevicePixelRatio β 489 B β
β onStartTyping β 471 B β
β useEventSource β 471 B β
β useOnline β 467 B β
β useNetwork β 455 B β
β useRefHistory β 451 B β
β useGeolocation β 408 B β
β useBrowserLocation β 405 B β
β useMouse β 403 B β
β useBattery β 395 B β
β useAsyncState β 367 B β
β usePermission β 365 B β
β useWindowSize β 347 B β
β useWindowScroll β 344 B β
β useClipboard β 337 B β
β usePreferredColorScheme β 333 B β
β useWebSocket β 329 B β
β useDeviceOrientation β 324 B β
β useThrottle β 318 B β
β usePageLeave β 300 B β
β useDocumentVisibility β 291 B β
β usePreferredDark β 285 B β
β useCssVar β 284 B β
β usePreferredLanguages β 282 B β
β useTimeoutFn β 282 B β
β useWebWorker β 277 B β
β useDeviceLight β 273 B β
β useInterval β 273 B β
β useDebounce β 262 B β
β useThrottleFn β 258 B β
β useMediaQuery β 247 B β
β useRaf β 244 B β
β useTitle β 243 B β
β useIntersectionObserver β 239 B β
β useTimeout β 227 B β
β useRafFn β 224 B β
β useEventListener β 222 B β
β useNow β 207 B β
β useDebounceFn β 204 B β
β useFullscreen β 201 B β
β useIntervalFn β 199 B β
β createGlobalState β 197 B β
β useResizeObserver β 195 B β
β useMutationObserver β 190 B β
β useCounter β 183 B β
β explicitComputed β 146 B β
β isWindow β 144 B β
β tryOnMounted β 143 B β
β assert β 137 B β
β isObject β 122 B β
β DEVICE_PIXEL_RATIO_SCALES β 109 B β
β tryOnUnmounted β 107 B β
β clamp β 98 B β
β isBoolean β 92 B β
β isNumber β 91 B β
β isString β 91 B β
β timestamp β 87 B β
β isFunction β 86 B β
β isDef β 84 B β
β isClient β 83 B β
β now β 79 B β
β noop β 65 B β
βββββββββββββββββββββββββββββ΄βββββββββββ
TODO
- Support local packages
- Support JSON output
- ESBuild / Rollup
- Support custom output path
Sponsors
This project is part of my Sponsor Program
License
MIT