Skip to content

Commit 371e8ce

Browse files
aguynamedlorenChriztiaanChristiaan Landman
authored
Update lodash reference in vite optimizeDeps demo configs (#123)
Co-authored-by: Christiaan Landman <christiaan@journeyapps.com> Co-authored-by: Christiaan Landman <christiaanlandman@Christiaans-MacBook-Pro-2.local>
1 parent c6ffb7b commit 371e8ce

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

.changeset/clever-kiwis-lay.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"example-vite": patch
3+
"@journeyapps/powersync-react-supabase-todolist": patch
4+
"@journeyapps/powersync-yjs-text-collab-demo": patch
5+
"@journeyapps/powersync-vue": patch
6+
---
7+
8+
Updated Vite Demo apps' `include` entries to use nested dependency syntax, fixes issue with CJS nested dependencies.

demos/example-vite/vite.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ export default defineConfig({
1818
// Don't optimize these packages as they contain web workers and WASM files.
1919
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2020
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
21-
include: ['object-hash', 'uuid', 'event-iterator', 'js-logger', 'lodash', 'can-ndjson-stream']
21+
include: [
22+
'@powersync/web > uuid',
23+
'@powersync/web > event-iterator',
24+
'@powersync/web > js-logger',
25+
'@powersync/web > lodash/throttle',
26+
'@powersync/web > can-ndjson-stream'
27+
]
2228
},
2329
plugins: [wasm(), topLevelAwait()],
2430
worker: {

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ 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: ['object-hash', 'uuid', 'event-iterator', 'js-logger', 'lodash', 'can-ndjson-stream']
28+
include: [
29+
'@powersync/web > uuid',
30+
'@powersync/web > event-iterator',
31+
'@powersync/web > js-logger',
32+
'@powersync/web > lodash/throttle',
33+
'@powersync/web > can-ndjson-stream'
34+
]
2935
},
3036
plugins: [
3137
wasm(),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default defineConfig({
7979
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
8080
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
8181
include: [
82-
'@powersync/common > uuid',
82+
'@powersync/web > uuid',
8383
'@powersync/web > event-iterator',
8484
'@powersync/web > js-logger',
8585
'@powersync/web > lodash/throttle',

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ export default defineConfig({
2626
// Don't optimize these packages as they contain web workers and WASM files.
2727
// https://github.com/vitejs/vite/issues/11672#issuecomment-1415820673
2828
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'],
29-
include: ['object-hash', 'uuid', 'event-iterator', 'js-logger', 'lodash', 'can-ndjson-stream']
29+
include: [
30+
'@powersync/web > uuid',
31+
'@powersync/web > event-iterator',
32+
'@powersync/web > js-logger',
33+
'@powersync/web > lodash/throttle',
34+
'@powersync/web > can-ndjson-stream'
35+
]
3036
},
3137
plugins: [
3238
wasm(),

0 commit comments

Comments
 (0)