Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Import Cost Lite - Show Package Sizes InlineNew to Visual Studio Code? Get it now.
Import Cost Lite - Show Package Sizes Inline

Import Cost Lite - Show Package Sizes Inline

miccho27

| (0) | Free
Display the bundle size of imported npm packages inline. Supports ES6 imports and CommonJS require. Color-coded warnings for large dependencies. Zero config, fast, and lightweight.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Import Cost Lite - Show Package Sizes Inline

Display the bundle size of imported npm packages directly in your editor. Supports ES6 imports, CommonJS require, and dynamic imports.

Features

  • Inline size display — See package sizes right next to your import statements
  • Color-coded warnings — Green (small), Yellow (medium), Red (large)
  • Gzip estimates — Shows both raw and gzip-compressed sizes
  • Zero config — Works out of the box with your node_modules
  • 30+ known package sizes — Instant results for popular packages like React, Lodash, Axios
  • Lightweight — No bundling required, reads from node_modules

Usage

Simply open any JavaScript or TypeScript file. Import sizes appear automatically as inline decorations.

Commands

  • Import Cost Lite: Toggle Display — Enable/disable size decorations
  • Import Cost Lite: Clear Size Cache — Clear the 24-hour size cache

Settings

Setting Default Description
importCostLite.enabled true Enable/disable decorations
importCostLite.smallSizeLimit 50 KB threshold for green (small)
importCostLite.mediumSizeLimit 100 KB threshold for yellow (medium)
importCostLite.showGzipSize true Show gzip size estimates

Supported Syntax

import React from 'react'           // ES6 default
import { useState } from 'react'    // ES6 named
import 'normalize.css'               // ES6 side-effect
const express = require('express')   // CommonJS
const mod = await import('lodash')   // Dynamic import
import { PrismaClient } from '@prisma/client' // Scoped packages

License

MIT

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