Skip to content

Commit

Permalink
Update Supabase demo to warn about js-logger when running Vite (#267)
Browse files Browse the repository at this point in the history
Co-authored-by: Christiaan Landman <[email protected]>
Co-authored-by: Christiaan Landman <[email protected]>
  • Loading branch information
3 people authored Aug 26, 2024
1 parent e77b1ab commit 3d75577
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions demos/example-capacitor/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default defineConfig({
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
plugins: [wasm(), topLevelAwait()],
worker: {
Expand Down
3 changes: 2 additions & 1 deletion demos/example-electron/vite.renderer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default defineConfig((env) => {
// Don't optimize these packages as they contain web workers and WASM files.
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
include: [],
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
plugins: [
// @ts-expect-error there is TS issue that doesn't actually affect the runtime
Expand Down
2 changes: 1 addition & 1 deletion demos/example-vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default defineConfig({
// Don't optimize these packages as they contain web workers and WASM files.
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
include: ['@powersync/web > js-logger']
},
plugins: [wasm(), topLevelAwait()],
worker: {
Expand Down
1 change: 1 addition & 0 deletions demos/react-multi-client/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineConfig({
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
plugins: [
wasm(),
Expand Down
3 changes: 2 additions & 1 deletion demos/react-supabase-todolist/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default defineConfig({
// Don't optimize these packages as they contain web workers and WASM files.
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
include: [],
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
plugins: [
wasm(),
Expand Down
3 changes: 2 additions & 1 deletion demos/vue-supabase-todolist/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export default defineConfig({
// Don't optimize these packages as they contain web workers and WASM files.
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
include: [],
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
worker: {
format: 'es',
Expand Down
1 change: 1 addition & 0 deletions demos/yjs-react-supabase-text-collab/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default defineConfig({
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
include: []
// include: ['@powersync/web > js-logger'], // <-- Include `js-logger` when it isn't installed and imported.
},
plugins: [
wasm(),
Expand Down

0 comments on commit 3d75577

Please sign in to comment.