Skip to content

Commit

Permalink
chore: updated pwa plugin and pnpm
Browse files Browse the repository at this point in the history
chore: use virtual pwa info on layout
  • Loading branch information
userquin committed Sep 19, 2022
1 parent 025e5eb commit 653dee7
Show file tree
Hide file tree
Showing 7 changed files with 519 additions and 525 deletions.
6 changes: 3 additions & 3 deletions examples/sveltekit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@sveltejs/adapter-static": "next",
"@sveltejs/kit": "next",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"@typescript-eslint/parser": "^5.38.0",
"@vite-pwa/sveltekit": "workspace:*",
"eslint": "^8.23.1",
"eslint-plugin-svelte3": "^4.0.0",
Expand All @@ -26,7 +26,7 @@
"svelte-preprocess": "^4.10.7",
"tslib": "^2.4.0",
"typescript": "^4.8.3",
"vite": "^3.1.1"
"vite": "^3.1.3"
},
"type": "module",
"dependencies": {
Expand Down
13 changes: 4 additions & 9 deletions examples/sveltekit-ts/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
import '../app.css';
import { onMount } from 'svelte'
import { browser } from '$app/environment'
// import { pwaEnabled } from '$vite-pwa/sveltekit'
// import WebManifest from '$vite-pwa/sveltekit/webmanifest'
import { pwaEnabled, webManifestLink } from "virtual:vite-pwa/sveltekit";
import { pwaInfo } from 'virtual:pwa-info'
const loadRPC = browser && pwaEnabled
const webManifest = webManifestLink()
const loadRPC = browser && pwaInfo
let ReloadPrompt
onMount(async () => {
Expand All @@ -19,9 +15,8 @@
</script>

<svelte:head>
<!--<WebManifest />-->
{#if webManifest}
{@html webManifest }
{#if pwaInfo}
{@html pwaInfo.webManifest.linkTag }
{/if}
</svelte:head>

Expand Down
24 changes: 9 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/sveltekit",
"type": "module",
"version": "0.12.7",
"packageManager": "pnpm@7.11.0",
"packageManager": "pnpm@7.12.0",
"description": "Zero-config PWA for SvelteKit",
"author": "antfu <[email protected]>",
"license": "MIT",
Expand All @@ -24,26 +24,20 @@
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs"
},
"./*": "./*",
"./types/client": {
"types": "./types/client.d.ts"
}
},
"types": "dist/index.d.ts",
"files": [
"dist",
"types",
"*.d.ts"
],
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./*"
"./dist/*"
]
}
},
"files": [
"dist",
"*.d.ts"
],
"engines": {
"node": ">=16.14"
},
Expand All @@ -62,15 +56,15 @@
"@types/node": "^18.7.18",
"@types/prompts": "^2.4.0",
"@types/workbox-build": "^5.0.1",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/eslint-plugin": "^5.38.0",
"eslint": "^8.23.1",
"kolorist": "^1.6.0",
"prompts": "^2.4.2",
"svelte": "^3.50.1",
"typescript": "^4.8.3",
"unbuild": "^0.8.11",
"vite": "^3.1.1",
"vite-plugin-pwa": "file:vite-plugin-pwa-0.12.7.tgz",
"vite": "^3.1.3",
"vite-plugin-pwa": "file:vite-plugin-pwa-0.12.8.tgz",
"workbox-window": "^6.5.4"
}
}
Loading

0 comments on commit 653dee7

Please sign in to comment.