
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vite-plugin-react-native-web
Advanced tools
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.
Just install it:
npm i vite-plugin-react-native-web -D
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_ENVprocess.env.EXPO_OS as "web"This plugin requires react-native-web and inline-style-prefixer as peer dependencies. You must install them in the node_modules directory of the app where you use this plugin.
Note: If you are using pnpm or a workspace setup, peer dependencies may be installed in nested
node_modulesfolders by default. To avoid issues, ensure bothreact-native-webandinline-style-prefixerare installed in the app's ownnode_modulesdirectory:
pnpm add react-native-web inline-style-prefixer
Please feel free to contribute to this project. Just fork it and submit a PR.
MIT
FAQs
React Native Web support for Vite
The npm package vite-plugin-react-native-web receives a total of 52,229 weekly downloads. As such, vite-plugin-react-native-web popularity was classified as popular.
We found that vite-plugin-react-native-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.