From fdf646155eeb56419f12c445dfae64fecb6baaa8 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 16 May 2024 11:54:10 +0200 Subject: [PATCH] Fix import issue, now hook issue shows --- src/App.jsx | 6 +++--- vite.config.js | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 7370a31..aab34a9 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import reactLogo from './assets/react.svg'; -import { Text } from 'react-native'; +import { View } from 'react-native'; import './App.css'; function App() { @@ -17,14 +17,14 @@ function App() {

Vite + React

-
+

Edit src/App.jsx and save to test HMR

-
+

Click on the Vite and React logos to learn more

diff --git a/vite.config.js b/vite.config.js index 75edf10..a4cd932 100644 --- a/vite.config.js +++ b/vite.config.js @@ -9,10 +9,12 @@ export default defineConfig({ react(), reactNative(), cjsInterop({ - dependencies: [ - "inline-style-prefixer", - "inline-style-prefixer/**", - ], + dependencies: ["inline-style-prefixer", "inline-style-prefixer/**"], }), ], + ssr: { + optimizeDeps: { + include: ["react-native-web"], + }, + }, });