Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chatty-news-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vue-supabase-todolist": patch
---

Added PWA support.
7 changes: 7 additions & 0 deletions demos/vue-supabase-todolist/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ components.d.ts
*.njsproj
*.sln
*.sw?

# PWA
**/public/workbox-*.js
**/public/sw.js
**/public/swe-worker-*
**/public/worker-*.js
**/public/fallback-*.js
1 change: 1 addition & 0 deletions demos/vue-supabase-todolist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"unplugin-fonts": "^1.1.1",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.2.0",
"vite-plugin-pwa": "^0.19.2",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-vuetify": "^2.0.3",
"vite-plugin-wasm": "^3.3.0",
Expand Down
1 change: 1 addition & 0 deletions demos/vue-supabase-todolist/public/powersync-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions demos/vue-supabase-todolist/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Vue from '@vitejs/plugin-vue';
import ViteFonts from 'unplugin-fonts/vite';
import Components from 'unplugin-vue-components/vite';
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
import { VitePWA } from 'vite-plugin-pwa';

// Utilities
import { fileURLToPath, URL } from 'node:url';
Expand All @@ -29,6 +30,41 @@ export default defineConfig({
}
]
}
}),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['powersync-logo.svg', 'supabase-logo.png', 'favicon.ico'],
manifest: {
theme_color: '#c44eff',
background_color: '#c44eff',
display: 'standalone',
scope: '/',
start_url: '/',
name: 'PowerSync Vue Demo',
short_name: 'PowerSync Vue',
icons: [
{
src: '/icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: '/icons/icon-256x256.png',
sizes: '256x256',
type: 'image/png'
},
{
src: '/icons/icon-384x384.png',
sizes: '384x384',
type: 'image/png'
},
{
src: '/icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
}
]
}
})
],
define: { 'process.env': {} },
Expand Down
51 changes: 38 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.