Expo Web Support #576
Replies: 5 comments 5 replies
-
Thanks for this, we'll take a look. |
Beta Was this translation helpful? Give feedback.
-
Happy to help, @thruflo. Really excited about this project. Working off of expo example. Let me know if you have any questions. I'll keep experimenting. |
Beta Was this translation helpful? Give feedback.
-
@tyrauber did you manage to fix the issues for your own needs? Moving this into a discussion so we can track it as a feature request. |
Beta Was this translation helpful? Give feedback.
-
Hey @balegas, I did not. The essential issue is that
Unfortunately, this produced a series of babel issues I failed to fully debug. |
Beta Was this translation helpful? Give feedback.
-
Currently, I am stuck here after using wa-sqlite: export async function initWaSQLite(dbName: string, config: ElectricConfig) {
const { ElectricDatabase, electrify } = await import(
"electric-sql/wa-sqlite"
);
const conn = await ElectricDatabase.init(dbName, distPath);
return await electrify(conn, schema, config);
} -- https://discord.com/channels/933657521581858818/1157020197576781914/1157029474420936734 -> babel-plugin-transform-import-meta -- |
Beta Was this translation helpful? Give feedback.
-
In order to build the example for expo web, a couple changes might be required:
a) should use metro for the web bundler:
b) resolve .mjs files in metro.config.js (Zod requires it)
c) NativeModules.SourceCode.scriptURL isn't cross-platform, therefore you might need to explicitly define the hostname / url through an env variable or find a cross platform method, perhaps in expo constants.
electric/examples/expo/src/config.ts
Line 2 in 4682c4a
Unfortunately, web still errors with a require cycles:
Beta Was this translation helpful? Give feedback.
All reactions