Skip to content
PluginStats

vite-plugin-prerender weekly downloads statistics

By Rudeus3Greyrat · npm · Vite plugins

Flexible, framework-agnostic static site generation for sites and SPAs built with vite.

View on npm Fresh · Dec 6, 2026

vite-plugin-prerender has 9,488 recorded weekly downloads on npm, a decrease of 10.3% over the past 30 days, ranking #1287 of 3,247 tracked listings.

Weekly downloads
9,488
Official API · Dec 5, 2026
7-day growth
+12.2%
+1K weekly downloads
30-day growth
-10.3%
-1.1K weekly downloads
90-day growth
-10.6%
-1.1K weekly downloads
Rank
#1287
▲ 19 in 7 days

About vite-plugin-prerender

vite-plugin-prerender

[![npm][npm-img]][npm-url] [![downloads][downloads-img]][downloads-url] [![github][github-img]][github-url] [![license][license-img]][license-url]

Flexible, framework-agnostic static site generation for sites and SPAs built with Vite.

It is inspired by prerender-spa-plugin

✅ Support any framework including Vue, React

✅ Flexible customised configuration

Install (yarn or npm)

node version: >=12.0.0

vite version: >=2.0.0

yarn add vite-plugin-prerender -D

or

npm i vite-plugin-prerender -D

Basic Usage (vite.config.js)

import vitePrerender from 'vite-plugin-prerender'
import path from 'path'

export default () => {
  return {
    plugins: [
      vitePrerender({
        // Required - The path to the vite-outputted app to prerender.
        staticDir: path.join(__dirname, 'dist'),
        // Required - Routes to render.
        routes: ['/', '/about', '/some/deep/nested/route'],
      }),
    ],
  }
}

Advanced Usage (vite.config.js)

import vitePrerender from 'vite-plugin-prerender'
import path from 'path'

const Renderer = vitePrerender.PuppeteerRenderer

export default () => {
  return {
    plugins: [
      vitePrerender({
        // Required - The path to the vite-outputted app to prerender.
        staticDir: path.join(__dirname, 'dist'),

        // Optional - The path your rendered app should be output to.
        // (Defaults to staticDir.)
        outputDir: path.join(__dirname, 'prerendered'),

        // Optional - The location of index.html
        indexPath: path.join(__dirname, 'dist', 'index.html'),

        // Required - Routes to render.
        routes: ['/', '/about', '/some/deep/nested/route'],

        // Optional - Allows you to customize the HTML and output path before
        // writing the rendered contents to a file.
        // renderedRoute can be modified and it or an equivelant should be returned.
        // renderedRoute format:
        // {
        //   route: String, // Where the output file will end up (relative to outputDir)
        //   originalRoute: String, // The route that was passed into the renderer, before redirects.
        //   html: String, // The rendered HTML for this route.
        //   outputPath: String // The path the rendered HTML will be written to.
        // }
        postProcess(renderedRoute) {
          // Ignore any redirects.
          renderedRoute.route = renderedRoute.originalRoute
          // Basic whitespace removal. (Don't use this in production.)
          renderedRoute.html = renderedRoute.html.split(/>[\s]+</gim).join('><')
          // Remove /index.html from the output path if the dir name ends with a .html file extension.
          // For example: /dist/dir/special.html/index.html -> /dist/dir/special.html
          if (renderedRoute.route.endsWith('.html')) {
            renderedRoute.outputPath = path.join(
              __dirname,
              'dist',
              renderedRoute.route,
            )
          }

          return renderedRoute
        },

        // Optional - Uses html-minifier (https://github.com/kangax/html-minifier)
        // To minify the resulting HTML.
        // Option reference: https://github.com/kangax/html-minifier#options-quick-reference
        minify: {
          collapseBooleanAttributes: true,
          collapseWhitespace: true,
          decodeEntities: true,
          keepClosingSlash: true,
          sortAttributes: true,
        },

        // Server configuration options.
        server: {
          // Normally a free port is autodetected, but feel free to set this if needed.
          port: 8001,
        },

        // The actual renderer to use. (Feel free to write your own)
        // Available renderers: https://github.com/Tribex/prerenderer/tree/master/renderers
        renderer: new Renderer({
          // Optional - The name of the property to add to the window object with the contents of `inject`.
          injectProperty: '__PRERENDER_INJECTED',
          // Optional - Any values you'd like your app to have access to via `window.injectProperty`.
          inject: {
            foo: 'bar',
          },

          // Optional - defaults to 0, no limit.
          // Routes are rendered asynchronously.
          // Use this to limit the number of routes rendered in parallel.
          maxConcurrentRoutes: 4,

          // Optional - Wait to render until the specified event is dispatched on the document.
          // eg, with `document.dispatchEvent(new Event('custom-render-trigger'))`
          renderAfterDocumentEvent: 'custom-render-trigger',

          // Optional - Wait to render until the specified element is detected using `document.querySelector`
          renderAfterElementExists: 'my-app-element',

          // Optional - Wait to render until a certain amount of time has passed.
          // NOT RECOMMENDED
          renderAfterTime: 5000, // Wait 5 seconds.

          // Other puppeteer options.
          // (See here: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions)
          headless: false, // Display the browser window when rendering. Useful for debugging.
        }),
      }),
    ],
  }
}

Documentation

Plugin Options…

Description from the npm listing.

  • vite
  • vite-plugin
  • prerender
  • Rudeus3Greyrat

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-prerender weekly downloads on npm, last 90 days: 9,488 weekly downloads as of Dec 5, 2026, -10.6% over 90 days.vite-plugin-prerenderWeekly downloads on npm · Last 90 days9,488downloads / week-10.6% over 90 days02K4K6K8K10K12K14KSep 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-prerender weekly downloads on npm, last 90 days: 9,488 weekly downloads as of Dec 5, 2026, -10.6% over 90 days.

7/30/90-day growth

vite-plugin-prerender weekly downloads growth on npm: +12.2% over 7 days, -10.3% over 30 days, -10.6% over 90 days.vite-plugin-prerenderWeekly downloads growth on npm9,488downloads / week now7-day growth+1,032 weekly downloads+12.2%30-day growth-1,087 weekly downloads-10.3%90-day growth-1,126 weekly downloads-10.6%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-prerender weekly downloads growth on npm: +12.2% over 7 days, -10.3% over 30 days, -10.6% over 90 days.

Ranking history

vite-plugin-prerender npm ranking history: currently #1287 (by weekly downloads).vite-plugin-prerendernpm ranking · by weekly downloads · Last 90 days#1287current rank#1050#1100#1150#1200#1250#1300#1350Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-prerender npm ranking history: currently #1287 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 12, #17 (overall #237)
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 (170)
Recent weekly downloads observations for vite-plugin-prerender
Date (UTC)Weekly downloadsChange vs. previous
9,488+176
9,312+104
9,208+311
8,897-88
8,985+120
8,865+357
8,508+52
8,456+167
8,289+34
8,255-31
8,286+118
8,168-392
8,560-490
9,050—

Similar npm Vite plugins plugins

All 20 vite-plugin-prerender 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-prerender. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.