Skip to content
PluginStats

@samrum/vite-plugin-web-extension weekly downloads statistics

By samrum · npm · Vite plugins

A vite plugin for generating cross browser platform, ES module based web extensions

View on npm Fresh · Nov 3, 2026

@samrum/vite-plugin-web-extension has 14,506 recorded weekly downloads on npm, ranking #1097 of 2,762 tracked listings.

Weekly downloads
14,506
Official API · Nov 1, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1097
Among tracked npm listings

About @samrum/vite-plugin-web-extension

@samrum/vite-plugin-web-extension

npm version node compatibility ci

Generate cross browser platform, ES module based web extensions.

  • Manifest V2 & V3 Support
  • Completely ES module based extensions
    • Including in content scripts!
  • Vite based html and static asset handling
    • Including in content scripts!
  • HMR support
    • All Manifest entry points
      • Including content scripts when using a Chromium browser!
    • CSS styles in content scripts
      • Including shadow DOM rendered content!
    • Including Manifest V3 support since Chromium 110!

Quick Start

Create a new Vite web extension project

npm init @samrum/vite-plugin-web-extension@latest

Supports choice of Manifest version, TypeScript support, and framework (Preact, React, Solid, Svelte, Vanilla, Vue).

Check the README of the generated extension for usage information.

Usage

Requires Vite 3+

npm install @samrum/vite-plugin-web-extension
Examples
<details> <summary>Manifest V2</summary>

vite.config.js:

import { defineConfig } from "vite";
import webExtension from "@samrum/vite-plugin-web-extension";

export default defineConfig({
  plugins: [
    webExtension({
      manifest: {
        name: pkg.name,
        description: pkg.description,
        version: pkg.version,
        manifest_version: 2,
        background: {
          scripts: ["src/background/script.js"],
        },
      },
    }),
  ],
});
</details> <details> <summary>Manifest V3</summary>

vite.config.js:

import { defineConfig } from "vite";
import webExtension from "@samrum/vite-plugin-web-extension";

export default defineConfig({
  plugins: [
    webExtension({
      manifest: {
        name: pkg.name,
        description: pkg.description,
        version: pkg.version,
        manifest_version: 3,
        background: {
          service_worker: "src/background/serviceWorker.js",
        },
      },
    }),
  ],
});
</details> <details> <summary>Firefox Experimental Manifest V3 </summary> There are two configurations an extension needs to make for experimental manifest V3 support:
  1. Background service workers are not supported, so you are required to use a background script.

  2. The use_dynamic_url property is not supported for web accessible resources. In the plugin options, set useDynamicUrlWebAccessibleResources to false:

      webExtension({
        ...
        useDynamicUrlWebAccessibleResources: false,
      }),
    
</details> <details> <summary>Devtools</summary> To add content to the browser dev tools, add `devtools_page` to your manifest
devtools_page: "src/entries/devtools/index.html",

Place a script devtools.js in public dir.

var _browser;
if (chrome) {
  _browser = chrome;
} else {
  _browser = browser;
}
_browser.devtools.panels.create(
  "My Panel", // title
  "images/icon-16.png", // icon
  "src/entries/devtools/index.html" // content
);

Then load the script from your devtools html which placed in src/entries/devtools/index.html.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Devtools</title>
  </head>
  <body>
    <div id="app"></div>
    <script type="module" src="./main.ts"></script>
    <script src="/devtools.js"></script>
  </body>
</html>
</details>
Options

manifest

  • The manifest definition for your extension
  • All manifest property file names should be relative to the root of the project.

useDynamicUrlWebAccessibleResources (optional)

  • Type: boolean
  • Default: false
  • Adds the use_dynamic_url property to web accessible resources generated by the plugin
    • Caution: In Chrome 130, with this option enabled, importing a generated resource using chrome.runtime.getURL will not work (Chromium Issue)l

optimizeWebAccessibleResources (optional)

  • Type: boolean
  • Default: true
  • On build, in Manifest V3, merge web accessible resource definitions that have matching non-resource properties and dedupe and sort resources. In Manifest V2, sort web accessible resources.

additionalInputs (optional)

  • Type:

      type AdditionalInput =
        | string
        | {
            fileName: string;
            webAccessible?:
              | boolean
              | {
                  matches: string[];
                  extensionIds?: string[];
                  excludeEntryFile?: boolean;
                }
              | {
                  matches?: string[];
                  extensionIds: string[];
                  excludeEntryFile?: boolean;
                };
          };
    
      additionalInputs?: {
        scripts?: AdditionalInput[];
        html?: AdditionalInput[];
        styles?: AdditionalInput[];
      };
    ```…
    

Description from the npm listing.

  • vite
  • vite-plugin
  • web
  • extension
  • browser
  • chrome
  • firefox
  • edge
  • manifest
  • manifest V2
  • manifest V3

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

@samrum/vite-plugin-web-extension weekly downloads on npm, last 90 days: 14,506 weekly downloads as of Nov 1, 2026.@samrum/vite-plugin-web-extensionWeekly downloads on npm · Last 90 days14,506downloads / week13K13.5K14K14.5K15K15.5K16KAug 3Aug 18Sep 2Sep 17Oct 2Oct 17Nov 1downloads / weekNov 1, 2026 – Nov 1, 2026 · 1 observations · Updated Nov 1, 2026pluginstats.com
@samrum/vite-plugin-web-extension weekly downloads on npm, last 90 days: 14,506 weekly downloads as of Nov 1, 2026.

7/30/90-day growth

@samrum/vite-plugin-web-extension weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@samrum/vite-plugin-web-extensionWeekly downloads growth on npm14,506downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Nov 1, 2026pluginstats.com
@samrum/vite-plugin-web-extension weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@samrum/vite-plugin-web-extension npm ranking history: currently #1097 (by weekly downloads).@samrum/vite-plugin-web-extensionnpm ranking · by weekly downloads · Last 90 days#1097current rank#1095#1096#1097#1098#1099Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19Nov 3rankNov 3, 2026 – Nov 3, 2026 · 1 observations · Updated Nov 1, 2026pluginstats.com
@samrum/vite-plugin-web-extension npm ranking history: currently #1097 (by weekly downloads).

Listing placement

All npm2,762 listings · 139 pages · 1,382 shown · page 55, #17 (overall #1,097)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins280 listings · 14 pages · page 10, #15 (overall #195)
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 (1)
Recent weekly downloads observations for @samrum/vite-plugin-web-extension
Date (UTC)Weekly downloadsChange vs. previous
14,506—

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/@samrum/vite-plugin-web-extension. First seen Nov 3, 2026; last successful collection Nov 3, 2026. See the methodology.