Skip to content
PluginStats

vite-react-ssg weekly downloads statistics

By Daydreamer-riri · npm · Vite plugins

Static-site generation for React on Vite.

View on npm Fresh · Oct 18, 2026

vite-react-ssg has 28,331 recorded weekly downloads on npm, a decrease of 36.4% over the past 30 days, ranking #710 of 2,322 tracked listings.

Weekly downloads
28,331
Official API · Oct 18, 2026
7-day growth
-57.8%
-38.9K weekly downloads
30-day growth
-36.4%
-16.2K weekly downloads
90-day growth
-46.8%
-24.9K weekly downloads
Rank
#710
Among tracked npm listings

About vite-react-ssg

Vite React SSG

Static-site generation for React on Vite.

See demo(also document): docs

[!IMPORTANT] React Router v7 Notice

React Router v7 now has built-in SSG support. If you are using React Router v7, we recommend using its official SSG capabilities for better official support and integration.

vite-react-ssg will continue to maintain SSG functionality for React Router v6 users.

🎈 Support for @tanstack/router and wouter is in progress!

Support for the @tanstack/router router is still experimental, and pathname.lazy.tsx routes are not yet supported. For usage examples, see: main/examples/tanstack/src/main.tsx

Mentioned in Vite Awesome NPM version

Table of contents

Usage

<pre> <b>npm i -D vite-react-ssg</b> <em>react-router-dom</em> </pre>
// package.json
{
  "scripts": {
-   "build": "vite build"
+   "build": "vite-react-ssg build"
    // If you need ssr when dev
-   "dev": "vite",
+   "dev": "vite-react-ssg dev",

    // OR if you want to use another vite config file
+   "build": "vite-react-ssg build -c another-vite.config.ts"
  }
}
// src/main.ts
import { ViteReactSSG } from 'vite-react-ssg'
import routes from './App.tsx'

export const createRoot = ViteReactSSG(
  // react-router-dom data routes
  { routes },
  // function to have custom setups
  ({ router, routes, isClient, initialState }) => {
    // do something.
  },
)
// src/App.tsx
import type { RouteRecord } from 'vite-react-ssg'
import React from 'react'
import Layout from './Layout'
import './App.css'

export const routes: RouteRecord[] = [
  {
    path: '/',
    element: <Layout />,
    entry: 'src/Layout.tsx',
    children: [
      {
        path: 'a',
        lazy: () => import('./pages/a'),
      },
      {
        index: true,
        Component: React.lazy(() => import('./pages/index')),
      },
      {
        path: 'nest/:b',
        lazy: () => {
          const Component = await import('./pages/nest/[b]')
          return { Component }
        },
        // To determine which paths will be pre-rendered
        getStaticPaths: () => ['nest/b1', 'nest/b2'],
      },
    ],
  },
]
Use CSR during development

Vite React SSG provide SSR (Server-Side Rendering) during development to ensure consistency between development and production as much as possible.

But if you want to use CSR during development, just:

// package.json
{
  "scripts": {
-   "dev": "vite-react-ssg dev",
+   "dev": "vite",
    "build": "vite-react-ssg build"
  }
}
Single Page SSG

For SSG of an index page only (i.e. without react-router-dom); import vite-react-ssg/single-page instead.

// src/main.tsx
import { ViteReactSSG } from 'vite-react-ssg/single-page'
import App from './App.tsx'

export const createRoot = ViteReactSSG(<App />)

Extra route options

The RouteObject of vite-react-ssg is based on react-router, and vite-react-ssg receives some additional properties.

getStaticPaths

The getStaticPaths() function should return an array of path to determine which paths will be pre-rendered by vite-react-ssg.

This function is only valid for dynamic route.

const route = {
  path: 'nest/:b',
  lazy: () => import('./pages/nest/[b]'),
  entry: 'src/pages/nest/[b].tsx',
  // To determine which paths will be pre-rendered
  getStaticPaths: () => ['nest/b1', 'nest/b2'],
}
entry

You are not required to use this field. It is only necessary when "prehydration style loss" occurs. It should be the path from root to the target file.

eg: src/pages/page1.tsx

lazy

These options work well with the lazy field.

// src/pages/[page].tsx
export function Component() {
  return (
    <div>{/* your component */}</div>
  )
}

export function getStaticPaths() {
  return ['page1', 'page2']
}
// src/routes.ts
const routes = [
  {
    path: '/:page',
    lazy: () => import('./pages/[page]'),
  }
]

Note that during the build process, vite-react-ssg will automatically detect the files directly dynamically imported in the function you pass to the lazy field. This helps vite-react-ssg to get the route's style files or other static resources during the build, preventing flash of unstyled content.

If you still encounter FOUC (flash of unstyled content), please open an issue.

If your component isn't loading, make sure you have wrapped it or its parent in Suspense tags as described in the React documentation.

See example.

Data fetch…

Description from the npm listing.

  • vite
  • vite-plugin
  • ssg
  • ssr
  • react

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-react-ssg weekly downloads on npm, last 90 days: 28,331 weekly downloads as of Oct 18, 2026, -46.8% over 90 days.vite-react-ssgWeekly downloads on npm · Last 90 days28,331downloads / week-46.8% over 90 days010K20K30K40K50K60K70KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
vite-react-ssg weekly downloads on npm, last 90 days: 28,331 weekly downloads as of Oct 18, 2026, -46.8% over 90 days.

7/30/90-day growth

vite-react-ssg weekly downloads growth on npm: -57.8% over 7 days, -36.4% over 30 days, -46.8% over 90 days.vite-react-ssgWeekly downloads growth on npm28,331downloads / week now7-day growth-38,878 weekly downloads-57.8%30-day growth-16,206 weekly downloads-36.4%90-day growth-24,886 weekly downloads-46.8%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-react-ssg weekly downloads growth on npm: -57.8% over 7 days, -36.4% over 30 days, -46.8% over 90 days.

Ranking history

vite-react-ssg npm ranking history: currently #710 (by weekly downloads).vite-react-ssgnpm ranking · by weekly downloads · Last 90 days#710current rank#200#300#400#500#600#700#800Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 17, 2026 – Oct 20, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
vite-react-ssg npm ranking history: currently #710 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 36, #11 (overall #711)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins253 listings · 13 pages · page 6, #17 (overall #117)
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 (544)
Recent weekly downloads observations for vite-react-ssg
Date (UTC)Weekly downloadsChange vs. previous
28,331+9.1K
19,264-5.9K
25,186-133
25,319-11.2K
36,550-23.3K
59,8790
59,879-7.3K
67,209-546
67,755-721
68,476-387
68,863+3.6K
65,293+16.1K
49,210-6.9K
56,122—

Similar npm Vite plugins plugins

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