Skip to content

Commit 3d75577

Browse files
Update Supabase demo to warn about js-logger when running Vite (#267)
Co-authored-by: Christiaan Landman <chriz.ek@gmail.com> Co-authored-by: Christiaan Landman <christiaan@journeyapps.com>
1 parent e77b1ab commit 3d75577

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

demos/example-capacitor/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default defineConfig({
1919
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2020
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
2121
include: []
22+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
2223
},
2324
plugins: [wasm(), topLevelAwait()],
2425
worker: {

demos/example-electron/vite.renderer.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default defineConfig((env) => {
2525
// Don't optimize these packages as they contain web workers and WASM files.
2626
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2727
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
28-
include: []
28+
include: [],
29+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
2930
},
3031
plugins: [
3132
// @ts-expect-error there is TS issue that doesn't actually affect the runtime

demos/example-vite/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default defineConfig({
1717
// Don't optimize these packages as they contain web workers and WASM files.
1818
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
1919
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
20-
include: []
20+
include: ['@powersync/web > js-logger']
2121
},
2222
plugins: [wasm(), topLevelAwait()],
2323
worker: {

demos/react-multi-client/vite.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default defineConfig({
2626
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2727
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
2828
include: []
29+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
2930
},
3031
plugins: [
3132
wasm(),

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default defineConfig({
2525
// Don't optimize these packages as they contain web workers and WASM files.
2626
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2727
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
28-
include: []
28+
include: [],
29+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
2930
},
3031
plugins: [
3132
wasm(),

demos/vue-supabase-todolist/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ export default defineConfig({
7777
// Don't optimize these packages as they contain web workers and WASM files.
7878
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
7979
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
80-
include: []
80+
include: [],
81+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
8182
},
8283
worker: {
8384
format: 'es',

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default defineConfig({
3434
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
3535
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
3636
include: []
37+
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
3738
},
3839
plugins: [
3940
wasm(),

0 commit comments

Comments
 (0)