Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Import Size – Inline Bundle CostNew to Visual Studio Code? Get it now.
Import Size – Inline Bundle Cost

Import Size – Inline Bundle Cost

PuzariCloud

| (0) | Free
See the minified, gzip and brotli size of every imported package right next to the import, for JS, TS, JSX, TSX, Vue and Svelte (import and require). Measured with esbuild in a low-priority worker, cached per package version, only on open and save, with a time limit and a stop button: no CPU spikes
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Import Size – Inline Bundle Cost

See what each package import adds to your bundle, right next to the import: minified, gzip and brotli sizes for JavaScript, TypeScript, JSX, TSX, Vue and Svelte, including require(). It never runs while you type and never takes over your CPU. Sizes are measured in a separate low-priority process, with a time limit and a stop button, and cached per package version.

Inline sizes next to every import

Why this one

  • No CPU spikes. Sizing runs in its own process at the lowest OS priority, one package at a time, only when a file is opened or saved. While you type, only sizes that are already known are shown.
  • A time limit and a kill switch. A package that takes longer than 15 s (configurable) is stopped and marked skipped. After 3 slow packages in a row, everything pauses until you resume. Click the status bar while it is measuring to stop now.
  • Right numbers for your version. Results are cached on disk by package@version and what you import, so an upgrade is measured again and an unchanged package is never measured twice, across restarts and projects.
  • Real tree-shaking. Each import is bundled the way a modern bundler would (esbuild, ESM, browser, minified, NODE_ENV=production), so import { debounce } from 'lodash-es' shows the cost of debounce, not of all of lodash. Peer dependencies are not counted.
  • Nothing leaves your machine. No network calls, no account; private packages work.

Free features

  • Inline size after each import: minified · gzip · brotli (or just one of them), coloured green / yellow / red by size.
    • import x from, import { a, b as c } from, import * as, import 'side-effect', export … from, dynamic import();
    • require('x'), const { a } = require('x'), require('x').a;
    • .js .mjs .cjs .jsx .ts .tsx .vue .svelte; import type is ignored, and relative paths and Node built-ins are skipped.
  • Hover an import for the version, what is imported, all three sizes and the time it took.
  • File total in the status bar (each package counted once). Click it for options.
  • Generated or minified files and files over 512 kB are skipped.

Hover with sizes; Pro features shown where they apply

Pro (licence key, checked offline)

$12 a year, or $36 lifetime, per developer. Everything above stays free. Pro adds:

  • Size budgets. Set a limit per import, per file or per package; anything over it gets a warning in the Problems panel.
    "importSize.budgets": { "perImportKB": 30, "perFileKB": 120, "packages": { "moment": 10 }, "basis": "gzip" }
    
  • Lighter alternatives. For heavy packages with a known smaller replacement (moment → dayjs, lodash → lodash-es, axios → ky, uuid → crypto.randomUUID()…), the hover names it and its typical size.
  • Bundle cost report. Import Size: Write Bundle Cost Report measures every import in the workspace and writes import-size-report.md (paste it into a pull request or wiki) and import-size-report.json (for a CI check): packages by size, per-file totals, budget problems and alternatives.

In the free version, the hover says when a lighter alternative is known, and Pro commands say what they do when you use them. There are no timed pop-ups.

Pro: budget warnings and lighter alternatives

Pro: bundle cost report

Get a key at https://puzaricloud.in/apps/import-size/, then run Import Size: Enter Pro License Key.

Settings

Setting Default Meaning
importSize.enabled true Show sizes inline
importSize.computeOn openAndSave openAndSave, save or manual (Measure Imports in This File)
importSize.display all all, minified, gzip or brotli
importSize.colorBasis gzip Size used for colours, the file total and budgets
importSize.smallKB / mediumKB 10 / 50 Colour thresholds
importSize.timeoutSeconds 15 Time limit per package
importSize.maxFileKB 512 Skip larger source files
importSize.maxImportsPerFile 60 Measure at most this many imports per file
importSize.exclude node_modules, dist, build, *.min.js Files never measured
importSize.budgets {} Pro: size budgets
importSize.report.outputDir workspace root Pro: where the report is written

Commands

Measure Imports in This File, Stop Now and Pause, Resume, Toggle Inline Sizes, Clear Size Cache, Write Bundle Cost Report (Pro), Enter / Remove Pro License Key, Pro Features & Upgrade.

Notes

  • Packages must be installed (node_modules); nothing is downloaded.
  • Sizes are for a browser bundle of that import alone. Code shared between two packages is counted for each of them.
  • Works in VS Code 1.90+, VSCodium, Cursor and Windsurf, on desktop and Remote/WSL/Codespaces (not in the web-only editor).

Support: support@puzaricloud.in · Privacy

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft