-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updated linting and using new tutorial instructions containing…
… `useQuery`
- Loading branch information
1 parent
b9cbddb
commit acae7ab
Showing
6 changed files
with
164 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.env* | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
demos/vue-supabase-todolist-completed-tutorial/src/plugins/powerSync.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// src/plugins/powersync.ts | ||
import { AppSchema } from "../library/AppSchema.ts"; | ||
import { WASQLitePowerSyncDatabaseOpenFactory } from "@powersync/web"; | ||
import { createPowerSyncPlugin } from "@powersync/vue"; | ||
import { AppSchema } from '../library/AppSchema.ts'; | ||
import { WASQLitePowerSyncDatabaseOpenFactory } from '@powersync/web'; | ||
import { createPowerSyncPlugin } from '@powersync/vue'; | ||
|
||
export const powerSync = new WASQLitePowerSyncDatabaseOpenFactory({ | ||
dbFilename: "vue-todo.db", | ||
schema: AppSchema, | ||
dbFilename: 'vue-todo.db', | ||
schema: AppSchema | ||
}).getInstance(); | ||
|
||
export const powerSyncPlugin = createPowerSyncPlugin({ database: powerSync }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 25 additions & 25 deletions
50
demos/vue-supabase-todolist-completed-tutorial/vite.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
import { defineConfig } from "vite"; | ||
import vue from "@vitejs/plugin-vue"; | ||
import wasm from "vite-plugin-wasm"; | ||
import topLevelAwait from "vite-plugin-top-level-await"; | ||
import { fileURLToPath, URL } from "node:url"; | ||
import { defineConfig } from 'vite'; | ||
import vue from '@vitejs/plugin-vue'; | ||
import wasm from 'vite-plugin-wasm'; | ||
import topLevelAwait from 'vite-plugin-top-level-await'; | ||
import { fileURLToPath, URL } from 'node:url'; | ||
|
||
export default defineConfig(({ command }) => { | ||
const isDev = command === "serve"; | ||
const isDev = command === 'serve'; | ||
|
||
return { | ||
plugins: [vue(), wasm(), topLevelAwait()], | ||
define: { "process.env": {} }, | ||
define: { 'process.env': {} }, | ||
resolve: { | ||
alias: { | ||
"@": fileURLToPath(new URL("./src", import.meta.url)), | ||
'@': fileURLToPath(new URL('./src', import.meta.url)) | ||
}, | ||
extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"], | ||
extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'] | ||
}, | ||
optimizeDeps: { | ||
// 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"], | ||
exclude: ['@journeyapps/wa-sqlite', '@powersync/web'], | ||
include: [ | ||
"@powersync/web > uuid", | ||
"@powersync/web > event-iterator", | ||
"@powersync/web > js-logger", | ||
"@powersync/web > lodash/throttle", | ||
"@powersync/web > can-ndjson-stream", | ||
"@powersync/web > bson", | ||
"@powersync/web > buffer", | ||
"@powersync/web > rsocket-core", | ||
"@powersync/web > rsocket-websocket-client", | ||
"@powersync/web > cross-fetch", | ||
], | ||
'@powersync/web > uuid', | ||
'@powersync/web > event-iterator', | ||
'@powersync/web > js-logger', | ||
'@powersync/web > lodash/throttle', | ||
'@powersync/web > can-ndjson-stream', | ||
'@powersync/web > bson', | ||
'@powersync/web > buffer', | ||
'@powersync/web > rsocket-core', | ||
'@powersync/web > rsocket-websocket-client', | ||
'@powersync/web > cross-fetch' | ||
] | ||
}, | ||
worker: { | ||
format: "es", | ||
plugins: () => [wasm(), topLevelAwait()], | ||
format: 'es', | ||
plugins: () => [wasm(), topLevelAwait()] | ||
}, | ||
build: { | ||
sourcemap: !isDev, // Disable sourcemaps in development | ||
}, | ||
sourcemap: !isDev // Disable sourcemaps in development | ||
} | ||
}; | ||
}); |
Oops, something went wrong.