Skip to content

Commit 790206d

Browse files
committed
Tweaks.
1 parent 6353003 commit 790206d

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

demos/example-vite/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export default defineConfig({
1010
outDir: '../dist',
1111
rollupOptions: {
1212
input: 'src/index.html'
13-
}
13+
},
14+
emptyOutDir: true
1415
},
1516
envDir: '..', // Use this dir for env vars, not 'src'.
1617
optimizeDeps: {

demos/react-supabase-todolist/vite.config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default defineConfig({
1313
outDir: '../dist',
1414
rollupOptions: {
1515
input: 'src/index.html'
16-
}
16+
},
17+
emptyOutDir: true
1718
},
18-
esbuild: {},
1919
resolve: {
2020
alias: [{ find: '@', replacement: fileURLToPath(new URL('./src', import.meta.url)) }]
2121
},

demos/yjs-react-supabase-text-collab/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ cp .env.local.template .env.local
9494
In the repo directory, run the following to start the development server:
9595

9696
```bash
97-
pnpm watch
97+
pnpm dev
9898
```
9999

100-
Open [http://localhost:3000](http://localhost:3000) with your browser to try out the demo.
100+
Open [http://localhost:5173](http://localhost:5173) with your browser to try out the demo.
101101

102102
To try out the collaborative editing, copy and paste the URL of the page and open it in another browser (or another browser window).
103103

demos/yjs-react-supabase-text-collab/src/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<html lang="en">
22
<head>
3-
<link rel="manifest" href="/manifest.json" />
43
<meta name="theme-color" content="#c44eff" />
54
<link rel="apple-touch-icon" href="/icons/icon.png" />
65
<link rel="stylesheet" href="./app/globals.css" />

demos/yjs-react-supabase-text-collab/src/library/powersync/SupabaseConnector.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ export class SupabaseConnector extends BaseObserver<SupabaseConnectorListener> i
6363
} else if (error instanceof FunctionsFetchError) {
6464
console.log('Supabase edge function: Fetch error:', error.message);
6565
}
66+
if (error) {
67+
throw error;
68+
}
6669

6770
return {
6871
client: this.client,

demos/yjs-react-supabase-text-collab/vite.config.mts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export default defineConfig({
1313
outDir: '../dist',
1414
rollupOptions: {
1515
input: 'src/index.html'
16-
}
16+
},
17+
emptyOutDir: true
1718
},
1819
esbuild: {},
1920
resolve: {
@@ -34,6 +35,13 @@ export default defineConfig({
3435
VitePWA({
3536
registerType: 'autoUpdate',
3637
includeAssets: ['favicon.ico'],
38+
workbox: {
39+
globPatterns: [
40+
'**/*.{js,css,html,svg}',
41+
// Be selective with the fonts we're pre-caching, otherwise we end up with quite a lot
42+
'**/lato-{normal,heavy}-*.woff2'
43+
]
44+
},
3745
manifest: {
3846
theme_color: '#c44eff',
3947
background_color: '#c44eff',

0 commit comments

Comments
 (0)