vite-plugin-react-native-web 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,2 +1,38 @@
1
1
  # vite-plugin-react-native-web
2
- React Native Web support for Vite
2
+
3
+ [![npm](https://img.shields.io/npm/v/vite-plugin-react-native-web?style=flat-square)](https://www.npmjs.com/package/vite-plugin-react-native-web)
4
+
5
+ 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.
6
+
7
+ ## Installation
8
+
9
+ Just install it:
10
+
11
+ ```bash
12
+ npm i vite-plugin-react-native-web -D
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```typescript
18
+ import reactNativeWeb from "vite-plugin-react-native-web";
19
+
20
+ export default defineConfig({
21
+ plugins: [
22
+ reactNativeWeb()
23
+ ]
24
+ });
25
+ ```
26
+
27
+ If you are getting errors please report them in the issues section.
28
+
29
+ The following variables are transformed by the plugin:
30
+ - `global` is transformed to `window`
31
+ - `__DEV__` is transformed to `JSON.stringify(process.env.NODE_ENV === 'development')`
32
+ - `process.env.NODE_ENV` is transformed to `JSON.stringify(process.env.NODE_ENV)`
33
+
34
+ ## Contributing
35
+ Please feel free to contribute to this project. Just fork it and submit a PR.
36
+
37
+ ## License
38
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-react-native-web",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },