-
Notifications
You must be signed in to change notification settings - Fork 58
React native web support via webpack #280
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
Conversation
Started with UMD exporting.
…ge to at least not error on both platforms.
…with webpack, introduced workerPath flag which allows overriding of worker location.
🦋 Changeset detectedLatest commit: 78f01a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really nice so far. The docs are quite thorough with good examples.
demos/react-native-supabase-todolist/library/powersync/system.ts
Outdated
Show resolved
Hide resolved
demos/react-native-supabase-todolist/library/powersync/system.ts
Outdated
Show resolved
Hide resolved
…ths or factory methods.
# Conflicts: # demos/react-native-supabase-todolist/ios/Podfile.lock # demos/react-native-supabase-todolist/library/powersync/system.ts # pnpm-lock.yaml
…tabase constructor. Moved db worker to WebSqlOptenFactoryOptions.
…just WebSQL flags.
…/powersync-js into react-native-web-christiaan
# Conflicts: # packages/web/package.json # pnpm-lock.yaml
…enOptions interface.
…/powersync-js into react-native-web-christiaan
This introduces a webpack build step in
web
that takes thelib
contents created bytsc
and processes it further to add support forUMD
(written to thedist
dir). Most projects will still depend on thetsc
output (@powersync/web
, but projects can opt to use@powersync/web/umd
.An example use case for this is projects that want to leverage
react-native-web
. Thereact-native-web
setup is documented in the newreact-native-web-todo
demo. The demo also illustrates how to handle a few other issues that arise if a project aims to support both mobile and webI have added a showcase demo under
demos/react-native-web-supabase-todolist
which is based offreact-native-supabase-todolist
. While originally in the same demo, it turned out that too many things that were changed didn't benefit the corereact-native
use case and would just be noise for that path.Update
Tested that single tab and multi tab overrides work for both the react-native-web and the normal react (web js) projects