Skip to content
PluginStats

vite-plugin-simple-html weekly downloads statistics

By wojtekmaj (2 listings) · npm · Vite plugins

Vite plugin for HTML processing and minification

View on npm Fresh · Dec 6, 2026

vite-plugin-simple-html has 37,263 recorded weekly downloads on npm, an increase of 8.0% over the past 30 days, ranking #867 of 3,247 tracked listings.

Weekly downloads
37,263
Official API · Dec 5, 2026
7-day growth
+32.8%
+9.2K weekly downloads
30-day growth
+8.0%
+2.8K weekly downloads
90-day growth
+169%
+23.4K weekly downloads
Rank
#867
▲ 46 in 7 days

About vite-plugin-simple-html

npm downloads CI

vite-plugin-simple-html

Vite plugin for HTML processing and minification. "Lite" version of vite-plugin-html, supporting a subset of its features.

tl;dr

  • Install by executing npm install vite-plugin-simple-html or yarn add vite-plugin-simple-html.
  • Import by adding import simpleHtmlPlugin from 'vite-plugin-simple-html'.
  • Use it by adding simpleHtmlPlugin() to plugins section of your Vite config.

Usage

Here's an example of basic configuration:

import { defineConfig } from 'vite';
import simpleHtmlPlugin from 'vite-plugin-simple-html';

export default defineConfig({
  plugins: [
    simpleHtmlPlugin({
      inject: {
        data: {
          title: 'My app',
          script: '<script src="index.js"></script>',
        },
        tags: [
          {
            tag: 'meta',
            attrs: {
              name: 'description',
              content: 'My awesome app',
            },
          },
        ],
      },
      minify: true,
    }),
  ],
});

User guide

Minification

Minification is handled by @swc/html.

To minify your HTML files, set minify to true:

import { defineConfig } from 'vite';
import simpleHtmlPlugin from 'vite-plugin-simple-html';

export default defineConfig({
  plugins: [
    simpleHtmlPlugin({
      minify: true,
    }),
  ],
});

The default configuration in this case is:

{
  collapseWhitespaces: 'all',
  minifyCss: true,
  minifyJs: false,
  minifyJson: true,
  quotes: true,
  removeComments: true,
  removeEmptyAttributes: true,
  removeRedundantAttributes: 'all',
  tagOmission: false,
}

You can access that configuration by importing defaultMinifyOptions from the plugin:

import { defaultMinifyOptions } from 'vite-plugin-simple-html';

[!NOTE] The default configuration is designed for compatibility with vite-plugin-html. For more aggressive minification, consider adjusting the settings to better suit your needs.

If you want to customize the minification process, for example to minify JS, you can pass your own configuration object:

import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    simpleHtmlPlugin({
      minify: {
        minifyJs: true,
      },
    }),
  ],
});

For a full list of available options, refer to @swc/html documentation.

EJS variables support

You can inject variables into your HTML files using EJS syntax.

import { defineConfig } from 'vite';
import simpleHtmlPlugin from 'vite-plugin-simple-html';

export default defineConfig({
  plugins: [
    simpleHtmlPlugin({
      inject: {
        data: {
          title: 'My app',
        },
      },
    }),
  ],
});
<!doctype html>
<html lang="en">
  <head>
    <title><%= title %></title>
  </head>
  <body>
    <h1><%= title %></h1>
  </body>
</html>
Tag injection

You can inject tags into your HTML files.

import { defineConfig } from 'vite';
import simpleHtmlPlugin from 'vite-plugin-simple-html';

export default defineConfig({
  plugins: [
    simpleHtmlPlugin({
      inject: {
        tags: [
          {
            tag: 'meta',
            attrs: {
              name: 'description',
              content: 'My awesome app',
            },
          },
        ],
      },
    }),
  ],
});

By default, they are injected at the end of the <head> section of your HTML file. You can change that behavior by setting injectTo:

  • head: Injects tags at the end of the <head> section of your HTML file (default).
  • head-prepend: Injects tags at the beginning of the <head> section of your HTML file.
  • body: Injects tags at the end of the <body> section of your HTML file.
  • body-prepend: Injects tags at the beginning of the <body> section of your HTML file.

Detailed comparison with vite-plugin-html

Featurevite-plugin-simple-htmlvite-plugin-html
EJS support⚠️ Variables only✅
HTML tags injection✅✅
HTML/CSS/JS minification✅✅
JSON minification✅❌
entry script injection❌✅
template customization❌✅
multi-page support❌✅
Why bother?
  • vite-plugin-simple-html has considerably fewer dependencies. Compare:

  • vite-plugin-simple-html does not suffer from issue that breaks Vite proxy (which was the reason I created this plugin in the first place).

  • vite-plugin-simple-html does not use options deprecated in Vite 5, and thus does not produce deprecation warnings:

     WARN  plugin 'vite:html' uses deprecated 'enforce' option. Use 'order' option instead.
    
     WARN  plugin 'vite:html' uses deprecated 'transform' option. Use 'handler' option instead.
    

License

The MIT License.

Author…

Description from the npm listing.

  • vite
  • vite-plugin
  • plugin
  • html

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-simple-html weekly downloads on npm, last 90 days: 37,263 weekly downloads as of Dec 5, 2026, +169% over 90 days.vite-plugin-simple-htmlWeekly downloads on npm · Last 90 days37,263downloads / week+169% over 90 days05K10K15K20K25K30K35K40KSep 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-simple-html weekly downloads on npm, last 90 days: 37,263 weekly downloads as of Dec 5, 2026, +169% over 90 days.

7/30/90-day growth

vite-plugin-simple-html weekly downloads growth on npm: +32.8% over 7 days, +8.0% over 30 days, +169% over 90 days.vite-plugin-simple-htmlWeekly downloads growth on npm37,263downloads / week now7-day growth+9,207 weekly downloads+32.8%30-day growth+2,766 weekly downloads+8.0%90-day growth+23,420 weekly downloads+169%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-simple-html weekly downloads growth on npm: +32.8% over 7 days, +8.0% over 30 days, +169% over 90 days.

Ranking history

vite-plugin-simple-html npm ranking history: currently #867 (by weekly downloads).vite-plugin-simple-htmlnpm ranking · by weekly downloads · Last 90 days#867current rank#300#400#500#600#700#800#900#1000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-simple-html npm ranking history: currently #867 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 44, #7 (overall #867)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 8, #11 (overall #151)
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 (591)
Recent weekly downloads observations for vite-plugin-simple-html
Date (UTC)Weekly downloadsChange vs. previous
37,263+393
36,870+2.3K
34,557+2.8K
31,775+1.7K
30,077+1K
29,075+1.1K
28,018-38
28,056-479
28,535-108
28,643-840
29,483-868
30,351-265
30,616+669
29,947—

Similar npm Vite plugins plugins

All 20 vite-plugin-simple-html alternatives

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-simple-html. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.