Skip to content

Conversation

Chriztiaan
Copy link
Contributor

@Chriztiaan Chriztiaan commented Aug 26, 2024

This introduces a webpack build step in web that takes the lib contents created by tsc and processes it further to add support for UMD (written to the dist dir). Most projects will still depend on the tsc 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. The react-native-web setup is documented in the new react-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 web

I have added a showcase demo under demos/react-native-web-supabase-todolist which is based off react-native-supabase-todolist. While originally in the same demo, it turned out that too many things that were changed didn't benefit the core react-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

Copy link

changeset-bot bot commented Aug 26, 2024

🦋 Changeset detected

Latest commit: 78f01a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@powersync/attachments Patch
@powersync/common Patch
@powersync/kysely-driver Patch
@powersync/react Patch
@powersync/react-native Patch
@powersync/web Minor
@powersync/diagnostics-app Patch

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

Copy link
Collaborator

@stevensJourney stevensJourney left a 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.

@Chriztiaan Chriztiaan changed the title React native web christiaan React native web support via webpack Aug 27, 2024
@Chriztiaan Chriztiaan changed the title React native web support via webpack IGNORE // React native web support via webpack Aug 27, 2024
@Chriztiaan Chriztiaan changed the title IGNORE // React native web support via webpack IGNORE - Pending further API changes // React native web support via webpack Aug 27, 2024
# Conflicts:
#	demos/react-native-supabase-todolist/ios/Podfile.lock
#	demos/react-native-supabase-todolist/library/powersync/system.ts
#	pnpm-lock.yaml
@Chriztiaan Chriztiaan changed the title IGNORE - Pending further API changes // React native web support via webpack React native web support via webpack Sep 4, 2024
@Chriztiaan Chriztiaan marked this pull request as ready for review September 4, 2024 15:10
stevensJourney
stevensJourney previously approved these changes Sep 16, 2024
@Chriztiaan Chriztiaan merged commit 02f0ce7 into main Sep 16, 2024
5 checks passed
@Chriztiaan Chriztiaan deleted the react-native-web-christiaan branch September 16, 2024 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants