Closed MJRT closed 1 month ago
After investigated, expo web (sdk51) use metro as bundler, but metro is not support ESM now (Support ESM react-native.config
files · Issue #2167 · react-native-community/cli (github.com))
I tried use babel-plugin-transform-import-meta
and transform-dirname-filename
as babel transform plugin, but it's still failed.
Does anyone know how to make it compatible with CommonJS? I think this could further enhance Electric-sql's influence in the community.
this repo can reproduce easily, https://github.com/MJRT/import-meta-url-error-on-web
👋 we've been working the last month on a rebuild of the Electric server over at a temporary repo https://github.com/electric-sql/electric-next/
You can read more about why we made the decision at https://next.electric-sql.com/about
We're really excited about all the new possibilities the new server brings and we hope you'll check it out soon and give us your feedback.
We're now moving the temporary repo back here. As part of that migration we're closing all the old issues and PRs. We really appreciate you taking the time to investigate and report the bug!
I'm tried to pick up examples/web-pglite merge to examples/expo but failed.
console output:
version: expo sdk51, react-native-web 0.19.10, electric-sql 0.12.0, pglite 0.1.5
Here are my modification steps:
./src/ElectricProvider
./ElectricProvider.tsx
to./src/ElectricProvider/index.tsx
./src/ElectricProvider/index.web.tsx
./*
to../*
inindex.tsx
andindex.web.tsx
npx expo install react-native-web react-dom @expo/metro-runtime
"target": "es2020", "module": "esnext",
intsconfig.json
After coded, expo go is still right on my android phone, but web page is blank page with console error.
I tried some solutions from chatgpt and Google but they are still not work, and would like to know how to use it on expo web.