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 · Dec 6, 2026

vite-react-ssg has 60,587 recorded weekly downloads on npm, a decrease of 11.3% over the past 30 days, ranking #732 of 3,247 tracked listings.

Weekly downloads
60,587
Official API · Dec 5, 2026
7-day growth
+8.9%
+4.9K weekly downloads
30-day growth
-11.3%
-7.7K weekly downloads
90-day growth
+2.0%
+1.2K weekly downloads
Rank
#732
▲ 2 in 7 days

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: 60,587 weekly downloads as of Dec 5, 2026, +2.0% over 90 days.vite-react-ssgWeekly downloads on npm · Last 90 days60,587downloads / week+2.0% over 90 days020K40K60K80KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-react-ssg weekly downloads on npm, last 90 days: 60,587 weekly downloads as of Dec 5, 2026, +2.0% over 90 days.

7/30/90-day growth

vite-react-ssg weekly downloads growth on npm: +8.9% over 7 days, -11.3% over 30 days, +2.0% over 90 days.vite-react-ssgWeekly downloads growth on npm60,587downloads / week now7-day growth+4,944 weekly downloads+8.9%30-day growth-7,696 weekly downloads-11.3%90-day growth+1,172 weekly downloads+2.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-react-ssg weekly downloads growth on npm: +8.9% over 7 days, -11.3% over 30 days, +2.0% over 90 days.

Ranking history

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

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 7, #9 (overall #129)
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 (592)
Recent weekly downloads observations for vite-react-ssg
Date (UTC)Weekly downloadsChange vs. previous
60,587+1.6K
58,959+1.8K
57,168+2.8K
54,331-420
54,751-171
54,922-513
55,435-208
55,643-2.1K
57,703-4.7K
62,420-5.3K
67,677-8.6K
76,285-173
76,458-856
77,314—

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 Dec 6, 2026. See the methodology.