Skip to content
PluginStats

vite-import-maps weekly downloads statistics

By riccardoperra · npm · Vite plugins

A Vite plugin that manages import maps for shared dependencies in your Vite applications.

View on npm Fresh · Oct 17, 2026

vite-import-maps has 4,630 recorded weekly downloads on npm, a decrease of 86.3% over the past 30 days.

It ranks #1110 of 2,255 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -82.8%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
4,630
Official API · Oct 17, 2026
7-day growth
-38.9%
-2.9K weekly downloads
30-day growth
-86.3%
-29.3K weekly downloads
90-day growth
-82.8%
-22.4K weekly downloads
Rank
#1110
Among tracked npm listings

About vite-import-maps

vite-import-maps

Generate browser import maps from the modules Vite resolves in development and emits in production.

vite-import-maps keeps a browser import map aligned with Vite's module resolution. Declare packages or local entry points once; the plugin resolves them through the dev server and emits dedicated chunks during a production build.

It is designed for micro-frontends, plugin systems, and applications that load ESM modules at runtime while hosting shared dependencies themselves.

• Works in Vite development and production builds • Maps package specifiers and local ESM wrapper modules • Injects the map into HTML, exposes it as a virtual module, or emits JSON • Optionally adds integrity metadata to production chunks • Runs integration tests against Vite 6, 7, and 8

Table of contents

• Install • Quick start • Do you need this plugin? • Configuration • Consume the import map • Remote builds • CommonJS compatibility • Browser compatibility • How it works • Troubleshooting • Examples • Development • License

Install

Requirements

• Vite 6 or newer • A Node.js version that provides util.styleText: • Node.js 20.12.0 or newer on the 20.x release line • Node.js 21.7.0 or newer on the 21.x release line • Node.js 22 or newer

Quick start

Add the plugin to the host application—the application that serves the import map and shared modules:

Package entries such as clsx and react must already be installed in the host project.

By default, the plugin prepends an import map to the generated HTML. A simplified production map looks like this:

Production filenames follow your Vite output configuration, so they may include hashes.

[!NOTE] React, clsx, and other npm packages may resolve to CommonJS entry points. The plugin provides a compatibility wrapper when it can detect their exports. For explicit control, expose a local ESM wrapper such as react-esm.ts. See CommonJS compatibility.

[!IMPORTANT] If a separately built remote imports one of these specifiers, configure that dependency as external in the remote build. Otherwise the remote will bundle its own copy and the import map will not provide a shared instance.

Do you need this plugin?

This plugin is a good fit when the browser loads ESM modules at runtime and more than one part of your application needs to resolve the same bare import specifiers.

Typical use cases include:

• Micro-frontends — A host and independently delivered remotes need to resolve shared dependencies such as React, Vue, or Solid. • Plugin systems — Runtime-loaded plugins import APIs or libraries provided by the host application. • Self-hosted dependency sharing — You want the host to build and serve shared modules instead of loading them from a public CDN. • Custom public entry points — You want an import-map specifier to resolve to a local wrapper, a curated set of exports, or an application-owned module.

The plugin is most valuable when you want to use browser import maps without manually keeping development URLs and production chunk filenames in sync. The host becomes the source of truth: it resolves each configured entry with Vite, then exposes the resulting map to the browser.

You may not need it when

• Your application does not load modules at runtime. • Every dependency can stay inside one conventional application bundle. • A CDN-generated import map already meets your deployment and versioning requirements. • You need a complete micro-frontend runtime with remote discovery, version negotiation, fallbacks, or deployment orchestration. This plugin generates and exposes import maps; it does not provide those higher-level features.

Why self-host shared modules?

Public services such as esm.sh and JSPM are convenient and may be the simplest option for some applications. Self-hosting is useful when you need tighter control over:

• Availability — Shared modules are deployed with infrastructure you operate. • Network policy — The application does not depend on access to a public module CDN. • Version alignment — The host build determines the exact dependency versions it exposes. • Customization — Local ESM wrappers can adapt exports or provide application-specific entry points.

Remote modules do not need a Vite plugin to consume the generated map. They can be plain browser ESM.

Configuration

| Option | Default | Description |

| imports | required | Package specifiers or { name, entry } mappings to expose. name is the public specifier; entry is the package or local file Vite resolves. | | modulesOutDir | "" | Directory prefix for emitted shared chunks, relative to Vite's build output. | | integrity | false | Adds an integrity metadata map in production. true uses sha384; a hash name selects the algorithm. | | log | false | Enables detailed dependency-resolution logging. | | injectImportMapsToHtml | true | Injects through Vite's transformIndexHtml hook. Disable it when another layer owns the HTML, including most SSR setups. | | importMapHtmlTransformer | identity | Transforms the complete resolved import-map object. It can rewrite URLs or add fields such as scopes. | | outputAsFile | false | true serves/emits import-map.json; a string changes the basename, for example "runtime-map" produces runtime-map.json. |

Package entries

A string uses the same value as the public specifier and the module Vite resolves:

Use the object form when the public specifier and resolved entry differ:

Local entries are useful for exposing a controlled subset of exports or wrapping a CommonJS dependency in ESM.

Integrity metadata

Set one default for every entry, then override individual dependencies when needed:

Integrity hashes are calculated from emitted production chunks. Development import maps do not include integrity metadata.

Transform the generated map

The transformer receives the full import map plus the registered entries and internal store:

The transformed result is shared by HTML injection, the virtual module, and JSON-file output.…

Description from the npm listing.

  • vite
  • vite-plugin
  • import-maps
  • mfe
  • import maps
  • microfrontend
  • plugin

Where vite-import-maps sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 56, #10 (overall #1110)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 11, #7 (overall #207)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

vite-import-maps weekly downloads on npm, last 90 days: 4,630 weekly downloads as of Oct 17, 2026, -82.8% over 90 days.vite-import-mapsWeekly downloads on npm · Last 90 days4,630downloads / week-82.8% over 90 days010K20K30K40K50K60KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-import-maps weekly downloads on npm, last 90 days: 4,630 weekly downloads as of Oct 17, 2026, -82.8% over 90 days.
PNG SVG

7/30/90-day growth

vite-import-maps weekly downloads growth on npm: -38.9% over 7 days, -86.3% over 30 days, -82.8% over 90 days.vite-import-mapsWeekly downloads growth on npm4,630downloads / week now7-day growth-2,947 weekly downloads-38.9%30-day growth-29,286 weekly downloads-86.3%90-day growth-22,358 weekly downloads-82.8%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vite-import-maps weekly downloads growth on npm: -38.9% over 7 days, -86.3% over 30 days, -82.8% over 90 days.
PNG SVG

Ranking history

vite-import-maps npm ranking history: currently #1110 (by weekly downloads).vite-import-mapsnpm ranking · by weekly downloads · Last 90 days#1110current rank#1108#1109#1110#1111#1112Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 18, 2026 – Oct 18, 2026 · 1 observations · Updated Oct 17, 2026pluginstats.com
vite-import-maps npm ranking history: currently #1110 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for vite-import-maps
Date (UTC)Weekly downloadsChange vs. previous
4,630-1.5K
6,158-1.1K
7,234-1.7K
8,932-1.3K
10,2280
10,228+1.6K
8,658+1.1K
7,577+1.1K
6,506+1.5K
5,017+1.1K
3,897-150
4,047-1.5K
5,550-1.3K
6,801—

Similar npm Vite plugins plugins

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-import-maps. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.