Skip to content
PluginStats

vite-plugin-virtual-mpa weekly downloads statistics

By emosheeep (2 listings) · npm · Vite plugins

Out-of-box MPA plugin for Vite, with html template engine and virtual files support.

View on npm Fresh · Oct 17, 2026

vite-plugin-virtual-mpa has 6,130 recorded weekly downloads on npm, a decrease of 63.3% over the past 30 days.

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

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

PluginStats has 542 daily observations since Apr 24, 2025; the latest is from Oct 17, 2026.

Weekly downloads
6,130
Official API · Oct 17, 2026
7-day growth
-57.3%
-8.2K weekly downloads
30-day growth
-63.3%
-10.6K weekly downloads
90-day growth
-80.5%
-25.4K weekly downloads
Rank
#1038
Among tracked npm listings

About vite-plugin-virtual-mpa

vite-plugin-virtual-mpa ⚡

Out-of-box MPA plugin for Vite 📦, with html template engine and virtual files support, generate multiple entries using only one template.

English | 中文

Features

• 💡 EJS Template Capability • 💡 Fully Typed APIs and Prompts, Tiny and Pretty. • 🛠️ Customize the path of generated files, generate multiple files using only one template. • 🛠️ MPA support and History Fallback API for both dev and preview server.

Quick Start

View the cloud ide on stackblitz.com, and setup with the following scripts:

Then you can try whatever you want.

Usage

Options

Examples

Click here codesandbox for a quick preview!

Motivation

When building MPA(multi-page-applications) with Vite, we usually need a plugin that:

1. Has a template engine such as EJS, which can use one template to generate multiple files, and can customize the path of the generated files at build time.

2. Auto configurations for rollupOptions.input and provide the ability to configure the development server's proxy (primarily the History Fallback API).

There are so many MPA plugins for vite on the market, but it seems no one can do both of above at the same time. I filtered the following plugins based on name matching and downloads:

1. vite-plugin-mpa: It can automatically configure the entry and provide the DevServer proxy configuration (history fallback), but we must adjust the directory structure according to the convention, and does not support template engines and virtual entry, and cannot define the path to generate files.

2. vite-plugin-html-template: The author of this plugin is the same as vite-plugin-mpa, which is recommended by the author. It is primarily used in combination with the MPA plugin to provide template engine functionality, and also doesn't support virtual entry.

3. vite-plugin-html: It supports template engines only, but no virtual entry. You need to use multiple entry templates if you want to generate multiple files.

4. vite-plugin-virtual-html: It supports virtual entry points, provides a rendering interface to customize template engines. But there's no built-in template engine, so it's a bit cumbersome to use.

Here, "virtual entry" means that multiple entry HTML files are rendered through only one template file.

They have their strengths, but they don't work very well. Either it needs to be used in conjunction or it is a significant change to the existing project structure. Sometimes I wonder if it is losing the advantage of template by implementing a template engine but requiring multiple template files.

This plugin is designed to solve these problems, and it has all of these capabilities at the same time. By combining virtual entry and template engine, users can generate different entry HTML with only one template, and can customize the output path of the entry file (no need to manually write scripts to move!). It also provides an interface to configure rewrite rules for the development server, so that the development can correctly request the entry file.

If your project is using Vite workflow and is an MPA application, you may want to give this plugin a try. It doesn't limit the technology stack, it doesn't matter if you use Vue or React or any other technologies.

Default Rewrite Rules

As the examples above says 👆🏻, if you follow the conventions, this plugin will generate a default rule which will be applied to both dev and preview server, it looks like:

Here, inputMap is a dictionary that map the name matched into the corresponding virtual entry file. The structure of the inputMap is as follows:

Request url /sites/apple/xxx will be processed by Default Rewrite Rule, and will be redirected to the corresponding fallback url /fruits/apple.html(name 'apple' correspond to 'fruits/apple.html', the same goes for the rest ones), which is based on viteConfig.base(here is '/sites/'). So the final url will be /sites/fruits/apple.html.

About virtual entry files

Usually during development, our files are written locally, and we can access the local corresponding files through the URL through the DevServer proxy. The same is true for virtual files, except that the corresponding file is not written to the filesystem but is kept in memory.

The plugin generates virtual files using the template system, allowing you to reach the in-memory virtual files at development time and generate them in the corresponding directory at build time. It's perfectly okay to think that these virtual files are really exist, and it will help you build an intuition about them in your mind to be able to write your proxy configuration correctly.

About EJS template engine

Except for the data provided in the page configuration, ENV variables that start with 'VITE_' will be auto injected into the provided template. More information about envprefix can be found here.

Description from the npm listing.

  • vite
  • vite-plugin
  • virtual
  • virtual-html
  • html
  • html-mpa
  • html-template
  • mpa
  • multi
  • multi-page

Where vite-plugin-virtual-mpa 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 52, #18 (overall #1038)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 9, #20 (overall #180)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

vite-plugin-virtual-mpa weekly downloads on npm, last 90 days: 6,130 weekly downloads as of Oct 17, 2026, -80.5% over 90 days.vite-plugin-virtual-mpaWeekly downloads on npm · Last 90 days6,130downloads / week-80.5% over 90 days05K10K15K20K25K30K35KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-plugin-virtual-mpa weekly downloads on npm, last 90 days: 6,130 weekly downloads as of Oct 17, 2026, -80.5% over 90 days.
PNG SVG

7/30/90-day growth

vite-plugin-virtual-mpa weekly downloads growth on npm: -57.3% over 7 days, -63.3% over 30 days, -80.5% over 90 days.vite-plugin-virtual-mpaWeekly downloads growth on npm6,130downloads / week now7-day growth-8,218 weekly downloads-57.3%30-day growth-10,569 weekly downloads-63.3%90-day growth-25,360 weekly downloads-80.5%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
vite-plugin-virtual-mpa weekly downloads growth on npm: -57.3% over 7 days, -63.3% over 30 days, -80.5% over 90 days.
PNG SVG

Ranking history

vite-plugin-virtual-mpa npm ranking history: currently #1038 (by weekly downloads).vite-plugin-virtual-mpanpm ranking · by weekly downloads · Last 90 days#1038current rank#400#500#600#700#800#900#1000#1100Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
vite-plugin-virtual-mpa npm ranking history: currently #1038 (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 (542)
Recent weekly downloads observations for vite-plugin-virtual-mpa
Date (UTC)Weekly downloadsChange vs. previous
6,130-861
6,991+117
6,874-4.3K
11,146-4K
15,1570
15,157+753
14,404+56
14,348+486
13,862+505
13,357+1.3K
12,038-796
12,834-4.2K
17,011-1.1K
18,142—

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