1.0.2 • Published 1 month ago

vite-plugin-react-native-web v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

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 transformed by the plugin:

  • global is transformed to window
  • __DEV__ is transformed to JSON.stringify(process.env.NODE_ENV === 'development')
  • process.env.NODE_ENV is transformed to JSON.stringify(process.env.NODE_ENV)

Contributing

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

License

MIT

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago