Skip to content

Commit

Permalink
feat: setup pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Jul 24, 2024
1 parent c82fbb7 commit 5000d4d
Show file tree
Hide file tree
Showing 4 changed files with 2,863 additions and 117 deletions.
1 change: 1 addition & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Suspense>
<main class="flex flex-col lg:h-screen">
<NuxtLayout />
<NuxtPwaManifest />
</main>

<template #fallback>
Expand Down
4 changes: 3 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

export default defineNuxtConfig({
modules: ['@vueuse/nuxt', '@unocss/nuxt', '@nuxt/content'],
modules: ['@vueuse/nuxt', '@unocss/nuxt', '@nuxt/content', '@vite-pwa/nuxt', '@nuxt/image'],

css: ['@unocss/reset/tailwind.css', '~/styles/vars.css', '~/styles/index.css'],

Expand Down Expand Up @@ -36,6 +36,8 @@ export default defineNuxtConfig({
enabled: true,
},

pwa: {},

// Disable SSR when building
ssr: false,

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"dependencies": {
"@iconify/json": "^2.2.230",
"@nuxt/content": "^2.13.2",
"@nuxt/image": "^1.7.0",
"@unocss/nuxt": "^0.61.5",
"@vite-pwa/nuxt": "^0.9.1",
"@vueuse/nuxt": "^10.11.0",
"floating-vue": "^5.2.2",
"nuxt": "^3.12.4"
Expand Down
Loading

0 comments on commit 5000d4d

Please sign in to comment.