Compare commits

...

2 Commits

Author SHA1 Message Date
Amit Salunke b93b8f672f Merge pull request 'fix(build): resolve Android release compilation and web bundling issues' (#56) from build-issues into main
Reviewed-on: https://10.10.0.4/AcuPedia/acupedia-mobile-ui/pulls/56
Reviewed-by: Amit Salunke <amit@noreply.localhost>
2026-10-09 05:02:25 +00:00
Urvish Prajapati 8c6fc8624a fix(build): resolve Android release compilation and web bundling issues
- Configure metro.config.js with CommonJS condition priority to prevent ESM import.meta syntax errors on web
- Switch web.output to single in app.json for faster SPA client-side rendering
- Fix MainApplication.kt implementing reactNativeHost and reactHost via ReactNativeHostWrapper
- Remove obsolete hermesCommand resolution in android/app/build.gradle
2026-10-06 16:51:00 +05:30
3 changed files with 16 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
android/
# dependencies # dependencies
node_modules/ node_modules/

View File

@ -28,7 +28,7 @@
"allowBackup": false "allowBackup": false
}, },
"web": { "web": {
"output": "static", "output": "single",
"favicon": "./assets/images/favicon.png" "favicon": "./assets/images/favicon.png"
}, },
"plugins": [ "plugins": [

12
metro.config.js Normal file
View File

@ -0,0 +1,12 @@
const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
// Prioritize CommonJS / require / react-native conditions to avoid ESM import.meta in web builds
config.resolver.unstable_conditionNames = ['browser', 'require', 'react-native'];
if (config.resolver.unstable_conditionsByPlatform) {
config.resolver.unstable_conditionsByPlatform.web = ['browser', 'require', 'react-native'];
}
module.exports = config;