A VSCode extension that displays the bundle size of imported packages directly in your editor, with support for JavaScript, TypeScript, Vue, and Svelte files.
Inspired by: This project is inspired by and extends the ideas from vscode-bundle-size, adding support for Vue and Svelte single-file components.
Features
Inline Size Display: Shows package sizes directly next to import statements using inline decorations (no background)
Multi-Framework Support: Works with JavaScript, TypeScript, Vue, and Svelte files
Real-time Information: Fetches accurate bundle size data from bundlephobia API
Smart Caching: Caches results to minimize API calls and improve performance
Customizable Display: Choose between minified or gzipped sizes
Supported File Types
JavaScript (.js, .jsx)
TypeScript (.ts, .tsx)
Vue (.vue) - Parses <script> sections
Svelte (.svelte) - Parses <script> sections
Usage
Simply open any supported file with import statements. The extension will automatically display the package size next to each import:
import React from 'react'; // 📦 6.4 kB (gzipped)
import lodash from 'lodash'; // 📦 24.3 kB (gzipped)
Configuration
You can customize the extension behavior through VSCode settings: