diff --git a/index.web.js b/index.web.js new file mode 100644 index 00000000..5154bfa7 --- /dev/null +++ b/index.web.js @@ -0,0 +1,13 @@ +// index.web.js + +import {AppRegistry} from 'react-native' +import App from './src/App' +import {name as appName} from './src/app.json' + +// register the app +AppRegistry.registerComponent(appName, () => App) + +AppRegistry.runApplication(appName, { + initialProps: {}, + rootTag: document.getElementById('app-root'), +}) diff --git a/package.json b/package.json index 2838905f..adedd032 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "android": "react-native run-android", "ios": "react-native run-ios --simulator=\"iPhone 14\"", - "web": "react-scripts start", + "web": "webpack-dev-server --config ./web/webpack.config.js -d inline-source-map --hot --color", "start": "react-native start", "clean-cache": "rm -rf node_modules/.cache/babel-loader/*", "test": "jest --forceExit", @@ -43,7 +43,7 @@ "mobx-react-lite": "^3.4.0", "react": "18.2.0", "react-circular-progressbar": "^2.1.0", - "react-dom": "17.0.2", + "react-dom": "^18.2.0", "react-native": "0.71.0", "react-native-appstate-hook": "^1.0.6", "react-native-background-fetch": "^4.1.8", @@ -65,7 +65,7 @@ "react-native-tab-view": "^3.3.0", "react-native-url-polyfill": "^1.3.0", "react-native-version-number": "^0.3.6", - "react-native-web": "^0.17.7", + "react-native-web": "^0.18.11", "rn-fetch-blob": "^0.12.0", "tlds": "^1.234.0", "zod": "^3.20.2" @@ -78,6 +78,7 @@ "@react-native-community/eslint-config": "^3.0.0", "@testing-library/jest-native": "^5.3.3", "@testing-library/react-native": "^11.5.0", + "@tsconfig/react-native": "^2.0.3", "@types/he": "^1.1.2", "@types/jest": "^26.0.23", "@types/lodash.chunk": "^4.2.7", @@ -87,8 +88,11 @@ "@typescript-eslint/eslint-plugin": "^5.48.2", "@typescript-eslint/parser": "^5.48.2", "babel-jest": "^29.2.1", - "babel-plugin-react-native-web": "^0.17.7", + "babel-loader": "^9.1.2", + "babel-plugin-module-resolver": "^5.0.0", + "babel-plugin-react-native-web": "^0.18.12", "eslint": "^8.19.0", + "html-webpack-plugin": "^5.5.0", "jest": "^29.2.1", "jest-junit": "^15.0.0", "metro-react-native-babel-preset": "0.73.5", @@ -96,7 +100,11 @@ "react-native-dotenv": "^3.3.1", "react-scripts": "^5.0.1", "react-test-renderer": "18.2.0", - "typescript": "^4.4.4" + "typescript": "^4.4.4", + "url-loader": "^4.1.1", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.1", + "webpack-dev-server": "^4.11.1" }, "resolutions": { "@types/react": "^17" diff --git a/public/index.html b/public/index.html index 54fb90ee..f3791c83 100644 --- a/public/index.html +++ b/public/index.html @@ -53,6 +53,6 @@
- +