Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Import SizeNew to Visual Studio Code? Get it now.
Import Size

Import Size

wycliffe Pepela

|
4,882 installs
| (0) | Free
Display import size require package size in the editor
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Import Size VSCode Extension

This extension will display inline in the editor the size of the imported package. The extension utilizes webpack in order to detect the imported size.

This extension is based on @pepelawycliffe/import-size. It should work like wix's extension.

screenshot

Install

Before enabling this package, you should have esbuild installed globally via npm i -g esbuild. Currently this extension requires this package being installed in user system to work.

Features

Calculates the size of imports and requires. Currently supports:

  • Selective importing: import {Func} from 'utils';
  • Selective importing with alias: import {orig as alias} from 'utils';
  • Submodule importing: import Func from 'utils/Func';
  • Default importing: import Func from 'utils';
  • Entire content importing: import * as Utils from 'utils';
  • Supports both Javascript and Typescript
  • Require: const Func = require('utils').Func;

Known Issues

  • Importing two libraries with a common dependency will show the size of both libraries isolated from each other, even if the common library needs to be imported only once.

License

MIT @ pepelawycliffe

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft