@reactre/plugin weekly downloads statistics
By reactre (2 listings) · npm · Webpack plugins
reactre's compilers and React alias for Vite, Rollup, Rolldown, esbuild, webpack, Rspack and Bun.
@reactre/plugin has 28 recorded weekly downloads on npm, a decrease of 95.7% over the past 30 days, ranking #2923 of 3,247 tracked listings.
About @reactre/plugin
@reactre/plugin
reactre's build step for Vite, Rollup, Rolldown, esbuild, webpack, Rspack and Bun, built on unplugin.
bun add -d @reactre/plugin
It has two modes:
- reactre (the default): your
.jsxand.tsxfiles are compiled by@reactre/compilerinto templates and the code that updates them. - compat:
react,react-domand their subpaths resolve to@reactre/compat, andreact-dom/serverandreact-dom/staticto@reactre/compat/serverand/static, in your code and in your dependencies. Those pick the build for the bundle's target asreact-dom's do: a browser bundle's server renderer throws React's minified error codes, as React's browser build does, and a Node SSR build's React's full messages.react-dom/server.browser,.edge,.bunand.noderesolve to compat's entry for that build. Your.jsxand.tsxfiles are compiled too, so trees of HTML elements become templates. Server Components stay on React: a Vite environment namedrsc, or a build that resolves with thereact-servercondition, is left alone.
Vite
// vite.config.ts
import reactre from "@reactre/plugin/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [reactre()],
});
For a React app, install @reactre/compat and pass compat. Add @vitejs/plugin-react after it for Fast Refresh:
import react from "@vitejs/plugin-react";
plugins: [reactre({ compat: true }), react()],
With it, a saved component renders again in place, keeping its state; an edit that changes its hooks, or one to a class component, mounts it anew, as with React. react resolves to compat's development build in vite dev (the development export condition), which registers with React Refresh as react-dom does, and to its production build in vite build, which leaves Fast Refresh out. @vitejs/plugin-react's JSX transform does not run on the files this plugin compiles: it sees them already compiled. Without @vitejs/plugin-react, Vite reloads the page when you save.
Other bundlers
Each bundler has its own entry. The options are the same everywhere.
// rollup.config.js: put reactre() before the plugin that resolves node_modules.
import reactre from "@reactre/plugin/rollup";
export default { input: "src/main.tsx", plugins: [reactre(), nodeResolve()] };
// rolldown.config.js
import reactre from "@reactre/plugin/rolldown";
export default { input: "src/main.tsx", plugins: [reactre()] };
// esbuild
import reactre from "@reactre/plugin/esbuild";
await esbuild.build({ entryPoints: ["src/main.tsx"], bundle: true, plugins: [reactre()] });
// webpack.config.js
import reactre from "@reactre/plugin/webpack";
export default { entry: "./src/main.tsx", plugins: [reactre()] };
// rspack.config.js
import reactre from "@reactre/plugin/rspack";
export default { entry: "./src/main.tsx", plugins: [reactre()] };
// Bun
import reactre from "@reactre/plugin/bun";
await Bun.build({ entrypoints: ["src/main.tsx"], outdir: "dist", plugins: [reactre()] });
The plugin turns .jsx and .tsx files into plain JavaScript, TypeScript included, so webpack and Rspack need no other loader for them.
Options
reactre({
// Run a React app on @reactre/compat. true, or:
compat: {
// Include class components. false leaves them out, for apps whose code and libraries render
// no class component; the same as excluding "@classes".
classes: true,
// Compile your JSX's HTML element trees to templates. Off, your bundler's JSX transform
// handles JSX and the plugin only resolves react.
compile: true,
// The React APIs your app and its libraries use: "all", or a list of keys.
apis: "all",
// APIs and behaviours to switch off, by key: what only they need leaves the bundle.
exclude: [],
// The package react resolves to: "@reactre/compat", or "@reactre/full-compat", the same with
// React's time slicing (a transition's render yields every 5 ms). Install the one you name.
package: "@reactre/compat",
},
// Files to compile, and files to leave alone, by path.
include: /\.[jt]sx$/,
exclude: /[\\/]node_modules[\\/]/,
// reactre mode: read the whole program at a production build's start, so a component's holes
// that read a prop are bound only where some call site passes that prop reactively.
wholeProgram: true,
// reactre mode: which build of @reactre/core the app gets. true, its async runtime, which
// @reactre/core/features/async and /actions need; false, its default build. Unset: the async
// runtime where the program imports either module, or where no program is read.
async: undefined,
// reactre mode: build for the server, to render with @reactre/core/server. Off by default; with
// true, Vite's SSR builds and its dev server's server renders are, and any other bundler's build.
ssr: false,
// reactre mode: build the browser's code to hydrate what @reactre/core/server rendered with
// `hydrate: true`. Off by default.
hydrate: false,
});
Server rendering…
Description from the npm listing.
- reactre
- react
- unplugin
- vite-plugin
- rollup-plugin
- rolldown-plugin
- esbuild-plugin
- webpack-plugin
- rspack-plugin
- bun-plugin
- jsx
- compiler
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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 (142)Similar npm Webpack plugins plugins
All 20 @reactre/plugin alternativesData 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/@reactre/plugin. First seen Nov 10, 2026; last successful collection Dec 6, 2026. See the methodology.