Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expo Web Support #477

Closed
tyrauber opened this issue Sep 21, 2023 · 3 comments
Closed

Expo Web Support #477

tyrauber opened this issue Sep 21, 2023 · 3 comments

Comments

@tyrauber
Copy link

In order to build the example for expo web, a couple changes might be required:

a) should use metro for the web bundler:

    "web": {
      "favicon": "./assets/favicon.png",
      "bundler": "metro",
      "output": "static",
    },

b) resolve .mjs files in metro.config.js (Zod requires it)

config.resolver.sourceExts.push('mjs');

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.

const { hostname } = new URL(NativeModules.SourceCode.scriptURL)


Unfortunately, web still errors with a require cycles:

Require cycle: ../../node_modules/electric-sql/dist/migrators/index.js -> ../../node_modules/electric-sql/dist/migrators/bundle.js -> ../../node_modules/electric-sql/dist/migrators/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Require cycle: ../../node_modules/sqlite-parser/lib/index.js -> ../../node_modules/sqlite-parser/lib/streaming.js -> ../../node_modules/sqlite-parser/lib/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Require cycle: ../../node_modules/protobufjs/src/util/minimal.js -> ../../node_modules/protobufjs/src/util/longbits.js -> ../../node_modules/protobufjs/src/util/minimal.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
Require cycle: ../../node_modules/electric-sql/dist/satellite/client.js -> ../../node_modules/electric-sql/dist/satellite/shapes/cache.js -> ../../node_modules/electric-sql/dist/satellite/client.js
@thruflo
Copy link
Contributor

thruflo commented Sep 22, 2023

Thanks for this, we'll take a look.

@thruflo thruflo added the linear Created by Linear-GitHub Sync label Sep 22, 2023
@tyrauber
Copy link
Author

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.

@balegas
Copy link
Contributor

balegas commented Oct 17, 2023

@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.

@balegas balegas added feature request and removed linear Created by Linear-GitHub Sync labels Oct 17, 2023
@electric-sql electric-sql locked and limited conversation to collaborators Oct 17, 2023
@balegas balegas converted this issue into discussion #576 Oct 17, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants