Skip to content
PluginStats

@foldkit/vite-plugin weekly downloads statistics

By foldkit · npm · Vite plugins

Vite plugin for Foldkit with state-preserving live reload

View on npm Fresh · Oct 17, 2026

@foldkit/vite-plugin has 12,745 recorded weekly downloads on npm, a decrease of 0.9% over the past 30 days.

It ranks #853 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by +432%.

PluginStats has 542 daily observations since Apr 24, 2025; the latest is from Oct 17, 2026.

Weekly downloads
12,745
Official API · Oct 17, 2026
7-day growth
-21.8%
-3.6K weekly downloads
30-day growth
-0.9%
-115 weekly downloads
90-day growth
+432%
+10.3K weekly downloads
Rank
#853
Among tracked npm listings

About @foldkit/vite-plugin

@foldkit/vite-plugin

Vite plugin for Foldkit: view identity branding for the differ, plus state-preserving live reload.

Installation

Usage

Add the plugin to your vite.config.ts:

View identity

Foldkit's differ tracks two independent kinds of identity: user keys, which match siblings in dynamic lists, and a framework-managed identity, which decides whether a matched position is still the same thing. When the producing view function changes, the differ replaces the node instead of patching it, so DOM state cannot bleed across an identity change. Branches rendered inline by one view function share that function's identity and patch in place, exactly as same-type elements do in React; extracting the branches into named view functions makes them identity boundaries.

This plugin supplies that identity. At build time, in dev and production alike, it wraps every function return in your application modules with a branding call that stamps returned vnodes with the function's id (module path plus function name), set-if-absent. The identity is nothing else: it ships in the client bundle, so anything derived from the module's contents would be a published check against those contents. Identity therefore attaches at view-function boundaries, and any branching syntax behaves the same: if/else, ternaries, Effect Match, switch statements, and pattern-matching libraries are all equivalent, because identity belongs to the function that produced the subtree, not to the branch that selected it.

Foldkit core modules are never instrumented, and functions that never return vnodes are wrapped inertly. Builds without this plugin fall back to positional matching plus keys, where branch points need hand-written keys.

State-preserving live reload

When you save a file during development, the plugin:

1. Preserves your application's current Model 2. Triggers a full page reload 3. Restores the preserved Model after reload

Code changes do not reset the application. Forms stay filled, counters keep their values, and games keep their positions.

How it works

The plugin uses Vite's WebSocket connection to communicate between the dev server and browser:

• On file change: The browser sends the current Model to the Vite server for preservation. • On reload: The browser requests the preserved Model from the server and initializes the Foldkit Runtime with it.

The Model survives development reloads but clears on a manual browser refresh, so a refresh still resets the application.

Server rendering dev host

Pass ssr with the path to your server entry to render page requests through it during development:

With this set, the dev server converts HTML page requests to Web Request values, passes them to the entry's renderPage, and serves the returned Response. The request URL retains Vite's configured base prefix and the browser's query string. Vite continues to serve the client entry, HMR, and assets, and the server entry runs through Vite's module graph, so edits to it apply without a restart. The client side of the handoff needs no plugin configuration: a server-rendered application's client entry calls Runtime.hydrate instead of Runtime.run. Hydration adopts matching DOM, rebuilds mismatched subtrees, and refuses an invalid or cross-deployment handoff. The option shapes only the dev server; production hosts import the built server entry themselves. See the Server Rendering documentation for the full contract.

Vite retains ownership of configured proxy routes before Foldkit handles application requests. Vite's server.cors option applies to Vite-owned source modules, assets, and HMR. It does not add headers to application responses or answer their preflights. Preflight ownership follows Access-Control-Request-Method, so a preflight for an application POST reaches renderPage even when its path looks like an asset. An OPTIONS request without both Origin and Access-Control-Request-Method is not a preflight and also reaches renderPage. Define application CORS in renderPage, where development and the deployed host share one policy. Vite's allowedHosts check runs before proxy and application handling, including OPTIONS and methods the Web Request API cannot represent.

Server-rendered documents

With ssr.build, the client input is a script and the server entry produces the complete HTML document. Configure the script beside the server entry:

Import CSS from the client script. Export renderDocument alongside renderPage in the server entry:

Server.renderDocument(application, assets, options) assembles the document with the application's title, language, direction, canonical URL, and Open Graph URL. assets contains the emitted entryScript, ordered stylesheets, and modulePreloads. The plugin collects static imports and their CSS, leaves lazy imports to Vite's runtime, and supplies the same assets to request-time rendering and prerendering. The default document includes UTF-8 and viewport metadata. Wrap the helper to set a default lang or add trusted author-owned head markup, such as a favicon. Never interpolate unescaped request data into head.

The client build starts from a script rather than HTML. index.html appears in the client output only when prerendering generates /. The build refuses an existing root document copied from publicDir, emitted by another plugin, or left by an earlier build when emptyOutDir is disabled. Remove the source index.html when migrating an SSR build, move its stylesheet links into client imports, and move document tags into renderDocument. Build-time transformIndexHtml hooks do not run with a script input. In development, Vite transforms the rendered document for HMR and dev HTML hooks. containerId belongs only to a template-based custom host and cannot be combined with clientEntry.…

Description from the npm listing.

  • vite
  • vite-plugin
  • foldkit
  • live-reload
  • state-preservation

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@foldkit/vite-plugin weekly downloads on npm, last 90 days: 12,745 weekly downloads as of Oct 17, 2026, +432% over 90 days.@foldkit/vite-pluginWeekly downloads on npm · Last 90 days12,745downloads / week+432% over 90 days05K10K15K20K25KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
@foldkit/vite-plugin weekly downloads on npm, last 90 days: 12,745 weekly downloads as of Oct 17, 2026, +432% over 90 days.
PNG SVG

7/30/90-day growth

@foldkit/vite-plugin weekly downloads growth on npm: -21.8% over 7 days, -0.9% over 30 days, +432% over 90 days.@foldkit/vite-pluginWeekly downloads growth on npm12,745downloads / week now7-day growth-3,558 weekly downloads-21.8%30-day growth-115 weekly downloads-0.9%90-day growth+10,348 weekly downloads+432%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@foldkit/vite-plugin weekly downloads growth on npm: -21.8% over 7 days, -0.9% over 30 days, +432% over 90 days.
PNG SVG

Ranking history

@foldkit/vite-plugin npm ranking history: currently #853 (by weekly downloads).@foldkit/vite-pluginnpm ranking · by weekly downloads · Last 90 days#853current rank#300#400#500#600#700#800#900Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 17, 2026 – Oct 19, 2026 · 3 observations · Updated Oct 17, 2026pluginstats.com
@foldkit/vite-plugin npm ranking history: currently #853 (by weekly downloads).
PNG SVG

Listing placement

All npm2,256 listings · 113 pages · 1,129 shown · page 43, #13 (overall #853)
All npm: every listing in weekly downloads order
PNG SVG

Listing placement

Vite plugins250 listings · 13 pages · page 8, #2 (overall #142)
Vite plugins: every listing in weekly downloads order
PNG SVG

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 log 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 (542)
Recent weekly downloads observations for @foldkit/vite-plugin
Date (UTC)Weekly downloadsChange vs. previous
12,745-2.2K
14,994+1.4K
13,615-2.7K
16,339-4.2K
20,4910
20,491+1.4K
19,066+2.8K
16,303-139
16,442+517
15,925-596
16,521+2.5K
13,995-1.8K
15,770+545
15,225—

Similar npm Vite plugins plugins

All 20 @foldkit/vite-plugin 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/@foldkit/vite-plugin. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.