Generated Computers
Locals: an Apple Silicon engine that runs local LLMs up to 3x faster. A product of Generated Computers.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Run React Native in your browser. Write, bundle, and preview with HMR, Expo Router, and npm support — all client-side.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗reactnative.run is an open-source, browser-based development environment for React Native apps. It consists of three components:
| Component | Path | Description |
|---|---|---|
| browser-metro | browser-metro/ | Client-side JavaScript bundler that mirrors Metro's architecture |
| reactnative-esm | reactnative-esm/ | Express server that bundles npm packages on-demand with esbuild |
| website | website/ | Next.js app for reactnative.run (landing page, docs, playground) |
+api.ts files run in-browser via fetch interception# Install dependencies
npm install
# Start everything (ESM server + library watch + playground + website)
npm run dev
# Or start individual services
npm run dev:bundler # ESM server + browser-metro + playground
npm run dev:website # Next.js website only
This starts:
http://localhost:5200http://localhost:5201http://localhost:3000# Build everything (browser-metro + playground + website)
npm run build
# Build playground and copy to website
npm run build:playground
# Build website only
npm run build:website
# Build browser-metro library only
npm run build:metro
browser-metro/ # Core bundler library (npm: browser-metro)
src/
types.ts # Core interfaces
fs.ts # VirtualFS class
resolver.ts # Module resolution
bundler.ts # One-shot Bundler
incremental-bundler.ts # IncrementalBundler with HMR
source-map.ts # Source map utilities
hmr-runtime.ts # HMR runtime template
transforms/ # Sucrase + React Refresh transformers
plugins/ # data-bx-path plugin
example/ # Vite playground app
src/
App.tsx # Editor, preview, console UI
FileExplorer.tsx # Tree-view file explorer
bundler.worker.ts # Web worker orchestrator
editor-fs.ts # EditorFS with change tracking
monaco-ts-setup.ts # TypeScript support for Monaco
plugins/
expo-web.ts # React Native Web shims + aliases
user_projects/ # Sample projects (expo, basic, react, etc.)
reactnative-esm/ # npm package bundling service
src/index.ts # Express server
website/ # Next.js app (reactnative.run)
src/app/
page.tsx # Landing page
docs/ # MDX documentation (20+ pages)
playground/ # Playground iframe wrapper
og-image/ # OG image template
src/components/ # Shared components (nav, features, etc.)
scripts/
build-playground.sh # Build playground + copy to website/public
import {
Bundler, VirtualFS, typescriptTransformer
} from "browser-metro";
const files = {
"/index.ts": 'console.log("Hello from browser-metro!");',
};
const bundler = new Bundler(new VirtualFS(files), {
resolver: { sourceExts: ["ts", "tsx", "js", "jsx"] },
transformer: typescriptTransformer,
server: { packageServerUrl: "https://esm.reactnative.run" },
});
const code = await bundler.bundle("/index.ts");
For HMR with React Refresh:
import {
IncrementalBundler, VirtualFS, reactRefreshTransformer
} from "browser-metro";
const bundler = new IncrementalBundler(vfs, {
resolver: { sourceExts: ["ts", "tsx", "js", "jsx"] },
transformer: reactRefreshTransformer,
server: { packageServerUrl: "https://esm.reactnative.run" },
hmr: { enabled: true, reactRefresh: true },
});
const initial = await bundler.build("/index.tsx");
// On file change:
const result = await bundler.rebuild([{ path: "/App.tsx", type: "update" }]);
// result.hmrUpdate contains per-module code for hot patching
reactnative-esm bundles npm packages on-demand for browser consumption:
GET /pkg/lodash -> lodash@latest
GET /pkg/[email protected] -> [email protected]
GET /pkg/react-dom/client -> react-dom@latest, subpath /client
GET /pkg/@scope/[email protected]/sub -> scoped package with subpath
In production: https://esm.reactnative.run
All dependencies are externalized and version-pinned via X-Externals headers to prevent mismatches.
Full documentation is available at reactnative.run/docs:
The previous version used ES Modules to run React Native code directly in the browser. The current version takes a different approach: a CommonJS bundler that mirrors Metro's architecture but runs entirely client-side in a Web Worker.
Read more: How to build a dev server in the browser (Expo blog)
Built by Sanket Sahu (@sanketsahu) at RapidNative.
MIT
This project is not affiliated with, endorsed by, or associated with Meta, Facebook, the React Native team, or the React Foundation. React Native is a trademark of Meta Platforms, Inc. The domain name "reactnative.run" is simply a descriptive name for this open-source tool.