From ac3bac55138c490a7eb0c3c14b64bf326003c10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sat, 18 Feb 2023 12:00:15 +0100 Subject: [PATCH] feat: PWA using `@vite-pwa/nuxt` module with auto update strategy (#75) Co-authored-by: Anthony Fu --- .gitignore | 2 + .npmrc | 1 + README.md | 22 +- app.vue | 10 +- components/DarkToggle.vue | 8 + components/Logos.vue | 2 +- config/pwa.ts | 78 + constants/index.ts | 2 + nuxt.config.ts | 35 + package.json | 24 +- pnpm-lock.yaml | 3074 +++++++++++++++++++++++++++-------- public/apple-touch-icon.png | Bin 0 -> 3038 bytes public/favicon.ico | Bin 0 -> 15086 bytes public/maskable-icon.png | Bin 0 -> 4571 bytes public/nuxt.png | Bin 1882 -> 0 bytes public/nuxt.svg | 3 + public/pwa-192x192.png | Bin 0 -> 3243 bytes public/pwa-512x512.png | Bin 0 -> 7206 bytes public/robots.txt | 2 + public/vite.png | Bin 7685 -> 3498 bytes 20 files changed, 2558 insertions(+), 705 deletions(-) create mode 100644 config/pwa.ts create mode 100644 constants/index.ts create mode 100644 public/apple-touch-icon.png create mode 100644 public/favicon.ico create mode 100644 public/maskable-icon.png delete mode 100644 public/nuxt.png create mode 100644 public/nuxt.svg create mode 100644 public/pwa-192x192.png create mode 100644 public/pwa-512x512.png create mode 100644 public/robots.txt diff --git a/.gitignore b/.gitignore index 467d466..c888971 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ node_modules *.log dist +dev-dist .output .nuxt .env +.idea/ diff --git a/.npmrc b/.npmrc index cf04042..e2ad808 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ shamefully-hoist=true strict-peer-dependencies=false +shell-emulator=true diff --git a/README.md b/README.md index bacb21c..368bb83 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,26 @@ - [💚 Nuxt 3](https://nuxt.com/) - SSR, ESR, File-based routing, components auto importing, modules, etc. -- ⚡️ Vite - Instant HMR +- ⚡️ Vite - Instant HMR. - 🎨 [UnoCSS](https://github.com/antfu/unocss) - The instant on-demand atomic CSS engine. -- 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/antfu/unocss) +- 😃 Use icons from any icon sets in Pure CSS, powered by [UnoCSS](https://github.com/antfu/unocss). -- 🔥 The `