Skip to content

Commit 34296fd

Browse files
committed
fix rn bundling not working properly
1 parent 84d8c85 commit 34296fd

File tree

4 files changed

+8409
-7
lines changed

4 files changed

+8409
-7
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-linker=hoisted

demos/react-native-supabase-todolist/library/powersync/system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import '@azure/core-asynciterator-polyfill';
22

3-
import { createBaseLogger, LogLevel, PowerSyncDatabase, SyncClientImplementation, SyncStreamConnectionMethod } from '@powersync/react-native';
3+
import { createBaseLogger, LogLevel, PowerSyncDatabase, SyncClientImplementation } from '@powersync/react-native';
44
import React from 'react';
55
import { SupabaseStorageAdapter } from '../storage/SupabaseStorageAdapter';
66

@@ -68,7 +68,7 @@ export class System {
6868

6969
async init() {
7070
await this.powersync.init();
71-
await this.powersync.connect(this.supabaseConnector, { clientImplementation: SyncClientImplementation.RUST, connectionMethod: SyncStreamConnectionMethod.HTTP });
71+
await this.powersync.connect(this.supabaseConnector, { clientImplementation: SyncClientImplementation.RUST });
7272

7373
if (this.attachmentQueue) {
7474
await this.attachmentQueue.init();

demos/react-native-supabase-todolist/metro.config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ const config = getDefaultConfig(projectRoot);
1010
// 1. Watch all files within the monorepo
1111
config.watchFolders = [projectRoot];
1212
// 2. Let Metro know where to resolve packages and in what order
13-
config.resolver.nodeModulesPaths = [
14-
path.resolve(projectRoot, 'node_modules'),
15-
];
13+
config.resolver.nodeModulesPaths = [path.resolve(projectRoot, 'node_modules')];
1614
// #3 - Force resolving nested modules to the folders below
17-
config.resolver.disableHierarchicalLookup = true;
18-
config.resolver.unstable_enableSymlinks = true;
15+
// config.resolver.disableHierarchicalLookup = true;
16+
// config.resolver.unstable_enableSymlinks = true;
1917

2018
module.exports = config;

0 commit comments

Comments
 (0)