Skip to content
PluginStats

@netlify/vite-plugin-react-router weekly downloads statistics

By netlify (6 listings) · npm · Vite plugins

React Router 7+ Vite plugin for Netlify

View on npm Fresh · Dec 6, 2026

@netlify/vite-plugin-react-router has 14,503 recorded weekly downloads on npm, a decrease of 9.5% over the past 30 days, ranking #1146 of 3,247 tracked listings.

Weekly downloads
14,503
Official API · Dec 5, 2026
7-day growth
-36.3%
-8.3K weekly downloads
30-day growth
-9.5%
-1.5K weekly downloads
90-day growth
-14.6%
-2.5K weekly downloads
Rank
#1146
▼ 164 in 7 days

About @netlify/vite-plugin-react-router

React Router Adapter for Netlify

The React Router Adapter for Netlify allows you to deploy your React Router app to Netlify.

How to use

To deploy a React Router 7+ site to Netlify, install this package:

npm install @netlify/vite-plugin-react-router

It's also recommended (but not required) to use the Netlify Vite plugin, which provides full Netlify platform emulation directly in your local dev server:

npm install --save-dev @netlify/vite-plugin

and include the Netlify plugin in your vite.config.ts:

import { reactRouter } from '@react-router/dev/vite'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import netlifyReactRouter from '@netlify/vite-plugin-react-router' // <- add this
import netlify from '@netlify/vite-plugin' // <- add this (optional)

export default defineConfig({
  plugins: [
    reactRouter(),
    tsconfigPaths(),
    netlifyReactRouter(), // <- add this
    netlify(), // <- add this (optional)
  ],
})

Your app is ready to deploy to Netlify.

Deploying to Edge Functions

By default, this plugin deploys your React Router app to Netlify Functions (Node.js runtime). You can optionally deploy to Netlify Edge Functions (Deno runtime) instead.

First, toggle the edge option:

export default defineConfig({
  plugins: [
    reactRouter(),
    tsconfigPaths(),
    netlifyReactRouter({ edge: true }), // <- deploy to Edge Functions
    netlify(),
  ],
})

Second, you must provide an app/entry.server.tsx (or .jsx) file. Create a file with the following content:

export { default } from 'virtual:netlify-server-entry'

[!TIP]

If you prefer to avoid a @ts-ignore here, add this to vite-env.d.ts in your project root (or anywhere you prefer):

declare module 'virtual:netlify-server-entry' {
  import type { ServerEntryModule } from 'react-router'
  const entry: ServerEntryModule
  export default entry
}

Finally, if you have your own Netlify Functions (typically in netlify/functions) for which you've configured a path, you must exclude those paths to avoid conflicts with the generated React Router SSR handler:

export default defineConfig({
  plugins: [
    reactRouter(),
    tsconfigPaths(),
    netlifyReactRouter({
      edge: true,
      excludedPaths: ['/ping', '/api/*', '/webhooks/*'],
    }),
    netlify(),
  ],
})
Moving back from Edge Functions to Functions

To switch from Edge Functions back to Functions, you must:

  1. Remove the edge: true option from your vite.config.ts
  2. Delete the app/entry.server.tsx file (React Router will use its default Node.js-compatible entry)
Edge runtime

Before deploying to Edge Functions, review the Netlify Edge Functions documentation for important details:

Load context

This plugin automatically includes all Netlify context fields on loader and action context.

If you're using TypeScript, AppLoadContext is automatically aware of these fields (via module augmentation).

For example:

import { useLoaderData } from 'react-router'
import type { Route } from './+types/example'

export async function loader({ context }: Route.LoaderArgs) {
  return {
    country: context.geo?.country?.name ?? 'an unknown country',
  }
}
export default function Example() {
  const { country } = useLoaderData<typeof loader>()
  return <div>You are visiting from {country}</div>
}

If you've opted in to the future.v8_middleware flag, you can still use the above access pattern for backwards compatibility, but loader and action context will now be an instance of the type-safe RouterContextProvider. Note that this requires requires v2.0.0+ of @netlify/vite-plugin-react-router.

For example:

import { netlifyRouterContext } from '@netlify/vite-plugin-react-router/serverless'
//                    NOTE: if setting `edge: true`, import from /edge ^ instead here
import { useLoaderData } from 'react-router'
import type { Route } from './+types/example'

export async function loader({ context }: Route.LoaderArgs) {
  return {
    country: context.get(netlifyRouterContext).geo?.country?.name ?? 'an unknown country',
  }
}
export default function Example() {
  const { country } = useLoaderData<typeof loader>()
  return <div>You are visiting from {country}</div>
}

[!IMPORTANT]

Note that in local development, netlifyRouterContext requires Netlify platform emulation, which is provided seamlessly by @netlify/vite-plugin (or Netlify CLI - up to you).

Middleware context

React Router introduced a stable middleware feature in 7.9.0.

To use middleware, opt in to the feature via future.v8_middleware and follow the docs. Note that this requires requires v2.0.0+ of @netlify/vite-plugin-react-router.

To access the Netlify context specifically, you must import our RouterContext instance:…

Description from the npm listing.

  • react-router
  • vite-plugin
  • netlify

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

@netlify/vite-plugin-react-router weekly downloads on npm, last 90 days: 14,503 weekly downloads as of Dec 5, 2026, -14.6% over 90 days.@netlify/vite-plugin-react-routerWeekly downloads on npm · Last 90 days14,503downloads / week-14.6% over 90 days05K10K15K20K25K30K35KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@netlify/vite-plugin-react-router weekly downloads on npm, last 90 days: 14,503 weekly downloads as of Dec 5, 2026, -14.6% over 90 days.

7/30/90-day growth

@netlify/vite-plugin-react-router weekly downloads growth on npm: -36.3% over 7 days, -9.5% over 30 days, -14.6% over 90 days.@netlify/vite-plugin-react-routerWeekly downloads growth on npm14,503downloads / week now7-day growth-8,282 weekly downloads-36.3%30-day growth-1,519 weekly downloads-9.5%90-day growth-2,477 weekly downloads-14.6%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@netlify/vite-plugin-react-router weekly downloads growth on npm: -36.3% over 7 days, -9.5% over 30 days, -14.6% over 90 days.

Ranking history

@netlify/vite-plugin-react-router npm ranking history: currently #1146 (by weekly downloads).@netlify/vite-plugin-react-routernpm ranking · by weekly downloads · Last 90 days#1146current rank#850#900#950#1000#1050#1100#1150Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@netlify/vite-plugin-react-router npm ranking history: currently #1146 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 10, #18 (overall #198)
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 @netlify/vite-plugin-react-router
Date (UTC)Weekly downloadsChange vs. previous
14,503-695
15,198-1.6K
16,770+1.7K
15,033-1K
16,036-5.2K
21,277-1.5K
22,750-35
22,785-459
23,244+443
22,801-443
23,244-373
23,617-646
24,263+336
23,927—

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/@netlify/vite-plugin-react-router. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.