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

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.
package/README.md CHANGED
@@ -26,10 +26,10 @@ export default defineConfig({
26
26
 
27
27
  If you are getting errors please report them in the issues section.
28
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)`
29
+ The following variables are defined in the transformed files: (inferred during Vite's build process)
30
+ - `global` as `window`
31
+ - `__DEV__` as `process.env.NODE_ENV === 'development'`
32
+ - `process.env.NODE_ENV` as `process.env.NODE_ENV`
33
33
 
34
34
  ## Contributing
35
35
  Please feel free to contribute to this project. Just fork it and submit a PR.
package/dist/cjs/index.js CHANGED
@@ -64,7 +64,14 @@ const reactNativeWeb = ( /*options: ViteReactNativeWebOptions = {}*/) => ({
64
64
  return code;
65
65
  if (code.includes('@flow'))
66
66
  code = flowRemoveTypes(code).toString();
67
- return (await vite.transformWithEsbuild(code, id, { loader: loader['.js'] })).code;
67
+ return (await vite.transformWithEsbuild(code, id, {
68
+ loader: loader['.js'],
69
+ tsconfigRaw: {
70
+ compilerOptions: {
71
+ jsx: 'react-jsx',
72
+ },
73
+ },
74
+ })).code;
68
75
  },
69
76
  });
70
77
 
package/dist/es/index.js CHANGED
@@ -60,7 +60,14 @@ const reactNativeWeb = ( /*options: ViteReactNativeWebOptions = {}*/) => ({
60
60
  return code;
61
61
  if (code.includes('@flow'))
62
62
  code = flowRemoveTypes(code).toString();
63
- return (await transformWithEsbuild(code, id, { loader: loader['.js'] })).code;
63
+ return (await transformWithEsbuild(code, id, {
64
+ loader: loader['.js'],
65
+ tsconfigRaw: {
66
+ compilerOptions: {
67
+ jsx: 'react-jsx',
68
+ },
69
+ },
70
+ })).code;
64
71
  },
65
72
  });
66
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-react-native-web",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },