Skip to content
PluginStats

vite-plugin-component-tagger weekly downloads statistics

By didiercatz · npm · Vite plugins

A Vite plugin for tagging components with metadata attributes for debugging and development

View on npm Outdated · Nov 6, 2026

vite-plugin-component-tagger has 110 recorded weekly downloads on npm, an increase of 96.4% over the past 30 days, ranking #2604 of 3,247 tracked listings.

Weekly downloads
110
Official API · Dec 5, 2026
7-day growth
+104%
+56 weekly downloads
30-day growth
+96.4%
+54 weekly downloads
90-day growth
+19.6%
+18 weekly downloads
Rank
#2604
▼ 4 in 7 days

About vite-plugin-component-tagger

vite-plugin-component-tagger

A Vite plugin that automatically adds identifying attributes to your components during development, making it easier to debug and inspect your component structure.

npm version

Installation

pnpm i -D vite-plugin-component-tagger

Compatibility

This plugin requires Vite 5 or later.

Features
  • Improved performance with fast HMR updates
  • Excellent error handling and diagnostics
  • Full TypeScript support
  • Enhanced build optimization

Usage

Add the plugin to your Vite configuration:

// vite.config.js / vite.config.ts
import { defineConfig } from 'vite';
import componentTagger from 'vite-plugin-component-tagger';

export default defineConfig({
	plugins: [
		componentTagger({
			// options
		})
	]
});

Options

OptionTypeDefaultDescription
extensionsstring[]['.svelte']File extensions to process
enableInProdbooleanfalseWhether to enable the plugin in production builds
tagTypestring'components'Tagging mode: 'components' only tags the first HTML element in components (not component tags)

Examples

Basic Usage
// vite.config.js
import { defineConfig } from 'vite';
import componentTagger from 'vite-plugin-component-tagger';

export default defineConfig({
	plugins: [componentTagger()]
});
Custom File Extensions
// vite.config.js
import { defineConfig } from 'vite';
import componentTagger from 'vite-plugin-component-tagger';

export default defineConfig({
	plugins: [
		componentTagger({
			extensions: ['.svelte', '.vue'],
			enableInProd: true
		})
	]
});
Specific File Extensions
// vite.config.js
import { defineConfig } from 'vite';
import componentTagger from 'vite-plugin-component-tagger';

export default defineConfig({
	plugins: [
		componentTagger({
			extensions: ['.svelte']
		})
	]
});

How It Works

This plugin transforms your component files during development by adding identifying attributes to components. It adds:

  1. A reference attribute to the first HTML element in each component with precise line range information (data-ref="/path/to/Button.svelte#L42-45")

This makes it easier to:

  • Debug component hierarchies in the browser
  • Track exactly which line and column position of code generated each element
  • Write more targeted CSS selectors for testing
  • Understand component relationships in complex UI structures

For example, if you have a src/components/Button.svelte component, the plugin will add data-ref="src/components/Button.svelte#L12-14" attributes to elements in the component, making it easy to locate them in your source code.

Note: The plugin automatically skips files from node_modules directories. External components are not tagged.

Framework-specific Features

Svelte

The plugin is specifically optimized for Svelte components and handles:

  • Self-closing tags (<input />, <img />, etc.)
  • Special Svelte elements (<svelte:window>, <svelte:head>, etc.)
  • Control flow blocks ({#if}, {#each}, {:else}, etc.)
  • Conditional rendering
  • Nested components
Example with a Svelte Component
<!-- src/components/Button.svelte -->
<script>
	export let type = 'primary';
	export let size = 'medium';
</script>

<button class="button button--{type} button--{size}">
	<slot></slot>
</button>

After transformation (note only the first HTML element is tagged):

<!-- src/components/Button.svelte -->
<script>
	export let type = 'primary';
	export let size = 'medium';
</script>

<button
	class="button button--{type} button--{size}"
	data-ref="src/components/Button.svelte#L7-9"
>
	<slot></slot>
</button>
Important Notes About Tagging

The plugin:

  • Only tags the first HTML element in each component (skips component tags)
  • Skips uppercase element names (which are likely component calls)
  • Skips self-closing tags
  • Only adds the data-ref attribute (for tracing back to source location)
  • Only processes files not in node_modules

CI/CD

This project uses GitHub Actions for continuous integration and deployment with an optimized workflow:

Workflow Overview

We've implemented a streamlined CI/CD pipeline with three distinct workflows:

  1. CI Workflow (ci.yml) - Runs on pull requests and non-main branches

    • Lints, tests, and builds the project
    • Provides early feedback on code quality
  2. Publish Workflow (npm-publish.yml) - Runs when changes are merged to main

    • Lints, tests, and builds the project
    • Automatically bumps the version number based on commit messages
    • Publishes the package to npm
    • Creates a git tag for the new version
  3. Release Workflow (release.yml) - Runs when a new version tag is created

    • Generates a comprehensive changelog
    • Creates a GitHub release with release notes
Workflow Optimizations…

Description from the npm listing.

  • vite
  • vite-plugin
  • component
  • tagger

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-component-tagger weekly downloads on npm, last 90 days: 110 weekly downloads as of Dec 5, 2026, +19.6% over 90 days.vite-plugin-component-taggerWeekly downloads on npm · Last 90 days110downloads / week+19.6% over 90 days05K10K15K20K25KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-component-tagger weekly downloads on npm, last 90 days: 110 weekly downloads as of Dec 5, 2026, +19.6% over 90 days.

7/30/90-day growth

vite-plugin-component-tagger weekly downloads growth on npm: +104% over 7 days, +96.4% over 30 days, +19.6% over 90 days.vite-plugin-component-taggerWeekly downloads growth on npm110downloads / week now7-day growth+56 weekly downloads+104%30-day growth+54 weekly downloads+96.4%90-day growth+18 weekly downloads+19.6%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-component-tagger weekly downloads growth on npm: +104% over 7 days, +96.4% over 30 days, +19.6% over 90 days.

Ranking history

vite-plugin-component-tagger npm ranking history: currently #2604 (by weekly downloads).vite-plugin-component-taggernpm ranking · by weekly downloads · Last 90 days#2604current rank#1600#1800#2000#2200#2400#2600#2800Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 20, 2026 – Dec 6, 2026 · 23 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-component-tagger npm ranking history: currently #2604 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 131, #4 (overall #2,604)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 15, #20 (overall #300)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (157)
Recent weekly downloads observations for vite-plugin-component-tagger
Date (UTC)Weekly downloadsChange vs. previous
110-5
115+15
100+45
55+7
48-24
72-2
74+20
540
54-7
61-37
98+13
85+25
60+1
59—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vite-plugin-component-tagger. First seen Oct 20, 2026; last successful collection Nov 6, 2026. See the methodology.