Skip to content
PluginStats

@roots/vite-plugin weekly downloads statistics

By roots · npm · Vite plugins

A Vite plugin for working with WordPress.

View on npm Fresh · Oct 17, 2026

@roots/vite-plugin has 5,335 recorded weekly downloads on npm, a decrease of 28.8% over the past 30 days.

It ranks #1079 of 2,256 tracked npm listings by weekly downloads.

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

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

Weekly downloads
5,335
Official API · Oct 17, 2026
7-day growth
-55.5%
-6.7K weekly downloads
30-day growth
-28.8%
-2.2K weekly downloads
90-day growth
-36.4%
-3K weekly downloads
Rank
#1079
Among tracked npm listings

About @roots/vite-plugin

Vite Plugin for WordPress

Here lives a Vite plugin for WordPress development.

Support us

Roots is an independent open source org, supported only by developers like you. Your sponsorship funds WP Packages and the entire Roots ecosystem, and keeps them independent. Support us by purchasing Radicle or sponsoring us on GitHub — sponsors get access to our private Discord.

Features

• 🔄 Transforms @wordpress/* imports into global wp.* references • 📦 Generates dependency manifest for WordPress enqueuing • 🎨 Generates theme.json from Tailwind CSS configuration (colors, fonts, font sizes, border radius) • 🔥 Hot Module Replacement (HMR) support for the WordPress editor

Installation

Usage

Start by adding the base plugin to your Vite config:

Once you've added the plugin, WordPress dependencies referenced in your code will be transformed into global wp.* references.

When WordPress dependencies are transformed, a manifest containing the required dependencies will be generated called editor.deps.json.

External Mappings for Third-Party Plugins

The plugin can also handle third-party WordPress plugins that expose global JavaScript APIs, such as Advanced Custom Fields (ACF) or WooCommerce. This allows you to import these dependencies in your code while ensuring they're treated as external dependencies and properly enqueued by WordPress.

With this configuration, you can import from these packages in your code:

The plugin will transform these imports into global references:

The handle value is added to the dependency manifest (editor.deps.json) so WordPress knows to enqueue these scripts before your code runs.

Editor HMR Support

The plugin automatically enables CSS Hot Module Replacement (HMR) for the WordPress editor.

[!NOTE] JavaScript HMR is not supported at this time. JS changes will trigger a full page reload.

You can customize the HMR behavior in your Vite config:

Theme.json Generation

When using this plugin for theme development, you have the option of generating a theme.json file from your Tailwind CSS configuration.

To enable this feature, add the wordpressThemeJson plugin to your Vite config:

Partials

The plugin automatically discovers *.theme.js files in the resources/ directory and deep merges them into the generated theme.json. This lets you split your theme styles across multiple files — for example, co-locating block styles with their block templates.

Partials support two export formats:

Shorthand — blocks and elements at the top level are merged into styles:

Full — merged at the root level, allowing you to target any part of theme.json:

Files are merged in alphabetical order by path. During development, changes to .theme.js files will trigger a rebuild.

You can customize the directory to scan, pass multiple directories, or disable partials entirely:

Tailwind CSS Variables

By default, Tailwind v4 will only generate CSS variables that are discovered in your source files.

To generate the full default Tailwind color palette into your theme.json, you can use the static theme option when importing Tailwind:

The same applies for customized colors in the @theme directive. To ensure your colors get generated, you can use another form of the static theme option:

Community

Keep track of development and community news.

• Join us on Discord by sponsoring us on GitHub • Join us on Roots Discourse • Follow @rootswp on Twitter • Follow the Roots Blog • Subscribe to the Roots Newsletter

Description from the npm listing.

  • vite
  • vite-plugin
  • wordpress

Where @roots/vite-plugin 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,256 listings · 113 pages · page 54, #19 (overall #1079)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 10, #13 (overall #193)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

@roots/vite-plugin weekly downloads on npm, last 90 days: 5,335 weekly downloads as of Oct 17, 2026, -36.4% over 90 days.@roots/vite-pluginWeekly downloads on npm · Last 90 days5,335downloads / week-36.4% over 90 days02K4K6K8K10K12K14KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
@roots/vite-plugin weekly downloads on npm, last 90 days: 5,335 weekly downloads as of Oct 17, 2026, -36.4% over 90 days.
PNG SVG

7/30/90-day growth

@roots/vite-plugin weekly downloads growth on npm: -55.5% over 7 days, -28.8% over 30 days, -36.4% over 90 days.@roots/vite-pluginWeekly downloads growth on npm5,335downloads / week now7-day growth-6,650 weekly downloads-55.5%30-day growth-2,160 weekly downloads-28.8%90-day growth-3,048 weekly downloads-36.4%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@roots/vite-plugin weekly downloads growth on npm: -55.5% over 7 days, -28.8% over 30 days, -36.4% over 90 days.
PNG SVG

Ranking history

@roots/vite-plugin npm ranking history: currently #1079 (by weekly downloads).@roots/vite-pluginnpm ranking · by weekly downloads · Last 90 days#1079current rank#1075#1076#1077#1078#1079#1080#1081Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@roots/vite-plugin npm ranking history: currently #1079 (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 @roots/vite-plugin
Date (UTC)Weekly downloadsChange vs. previous
5,335-1.1K
6,475-242
6,717-2.6K
9,358-2.8K
12,1440
12,144-266
12,410+425
11,985+521
11,464+790
10,674+545
10,129+686
9,443-2K
11,397+118
11,279—

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/@roots/vite-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.