MCPcopy Index your code
hub / github.com/Bram-dc/vite-plugin-react-native-web

github.com/Bram-dc/vite-plugin-react-native-web @3.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.1.0 ↗ · + Follow
5 symbols 34 edges 12 files 0 documented · 0% updated 3mo ago3.1.0 · 2026-03-17★ 623 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vite-plugin-react-native-web

npm

Add React Native Web support to Vite by removing Flow types, aliasing react-native to react-native-web and transforming .js files as .jsx files using ESBuild.

Installation

Just install it:

npm i vite-plugin-react-native-web -D

Usage

import reactNativeWeb from "vite-plugin-react-native-web";

export default defineConfig({
  plugins: [reactNativeWeb({ ... })],
});

If you are getting errors please report them in the issues section.

The following variables are defined in the transformed files: (inferred during Vite's build process)

  • global as globalThis
  • __DEV__ as process.env.NODE_ENV === 'development'
  • process.env.NODE_ENV as process.env.NODE_ENV
  • process.env.EXPO_OS as "web"

Examples

Contributing

Please feel free to contribute to this project. Just fork it and submit a PR.

License

MIT



Core symbols most depended-on inside this repo

reactNativeWeb
called by 2
packages/vite-plugin-react-native-web/src/index.ts
treeshakeFixPlugin
called by 2
packages/vite-plugin-react-native-web/src/plugins/treeshake-fix-plugin.ts
flowRemoveTypesPlugin
called by 2
packages/vite-plugin-react-native-web/src/plugins/flow-remove-types-plugin.ts
App
called by 0
apps/example/src/App.tsx
App
called by 0
apps/expo-example/src/App.tsx

Shape

Function 5

Languages

TypeScript100%

Modules by API surface

packages/vite-plugin-react-native-web/src/plugins/treeshake-fix-plugin.ts1 symbols
packages/vite-plugin-react-native-web/src/plugins/flow-remove-types-plugin.ts1 symbols
packages/vite-plugin-react-native-web/src/index.ts1 symbols
apps/expo-example/src/App.tsx1 symbols
apps/example/src/App.tsx1 symbols

For agents

$ claude mcp add vite-plugin-react-native-web \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact