realm-js
realm-js copied to clipboard
Expo Web support
Problem
I know the web context of Expo is not officially supported, but since Hermes is now supported and the default engine in Expo SDK 48 also switched to Hermes, maybe it is now somehow possible?
I get it running on Expo48 Android dev client, but when i try to bundle for web, I get:
The package at "node_modules\bindings\bindings.js" attempted to import the Node standard library module "fs".
It failed because the native React runtime does not include the Node standard library.
Maybe there is a workaround or fix for this or is it just plain impossible at the moment?
Solution
No response
Alternatives
No response
How important is this improvement for you?
Dealbreaker
Feature would mainly be used with
Atlas Device Sync
@riebel Thank you for reporting. It is not something we have tried out. You might be able to find a work-around by tweaking your Babel configuration: https://github.com/goatandsheep/react-native-dotenv/issues/78
I tried to modify my babel.config.js
with no success:
module.exports = function (api) {
api.cache(true)
return {
presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset'],
plugins: [
'@babel/plugin-proposal-export-namespace-from',
'react-native-reanimated/plugin',
require.resolve('expo-router/babel')
]
}
}
It is not on our current roadmap to support Expo Web but in general web is an interesting platform. I am curious to learn more about your use case? Do you want to share an app between mobile and web? Are you interested in developing your mobile app as a PWA?
Yes, I share the whole codebase with android, iOs and web and the same app runs flawlessly on all three platforms. I plan to switch from firebase to a self-hosted solution, but I think it is impractical for my project to use different APIs for web and for mobile. It would require a lot of duplicated code and/or a weird wrapper API.
@riebel Did you find any work around?
@federicogomezlara sadly not.
I'm having the same issue.
same
+1