Skip to content

Commit

Permalink
✨ Implement PWA support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Oct 21, 2024
1 parent d180ae8 commit 45476cf
Show file tree
Hide file tree
Showing 7 changed files with 2,328 additions and 128 deletions.
1 change: 1 addition & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<template>
<VitePwaManifest/>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
Expand Down
113 changes: 78 additions & 35 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,86 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: true,
devtools: {enabled: true},
ssr: true,
devtools: {enabled: true},

modules: [
"@nuxtjs/tailwindcss",
"shadcn-nuxt",
"@nuxt/eslint",
"@nuxtjs/color-mode",
"nuxt-icon",
"@nuxt/image"
],
modules: [
"@nuxtjs/tailwindcss",
"shadcn-nuxt",
"@nuxt/eslint",
"@nuxtjs/color-mode",
"nuxt-icon",
"@nuxt/image",
"@vite-pwa/nuxt"
],

shadcn: {
prefix: "",
componentDir: "./components/ui"
},
shadcn: {
prefix: "",
componentDir: "./components/ui"
},

colorMode: {
preference: "system",
fallback: "dark",
classSuffix: ""
},
colorMode: {
preference: "system",
fallback: "dark",
classSuffix: ""
},

tailwindcss: {
cssPath: [
"~/assets/css/index.css",
{injectPosition: 0}
],
configPath: "tailwind.config.ts",
exposeConfig: false,
viewer: true,
},
tailwindcss: {
cssPath: [
"~/assets/css/index.css",
{injectPosition: 0}
],
configPath: "tailwind.config.ts",
exposeConfig: false,
viewer: true,
},

app: {
head: {
link: [{rel: "icon", type: "image/svg+xml", href: "/logo.svg"}]
}
},
app: {
head: {
link: [{rel: "icon", type: "image/svg+xml", href: "/logo.svg"}]
}
},

compatibilityDate: "2024-10-12"
});
pwa: {
manifest: {
name: "Open Webtoon Reader",
short_name: "OWR",
description: "An open-source webtoon reader",
theme_color: "#020817",
screenshots: [
{
src: "/screenshot.png",
type: "image/png",
sizes: "1919x915",
form_factor: "wide"
},
{
src: "/screenshot.png",
type: "image/png",
sizes: "1919x915",
form_factor: "narrow"
}
],
icons: [
{
src: "/logo-192.webp",
sizes: "192x192",
type: "image/webp"
},
{
src: "/logo-512.webp",
sizes: "512x512",
type: "image/webp"
}
],
},
workbox: {
navigateFallback: "/",
},
devOptions: {
enabled: true,
type: "module",
}
},

compatibilityDate: "2024-10-12"
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@nuxt/image": "^1.7.0",
"@nuxtjs/color-mode": "^3.4.1",
"@vee-validate/zod": "^4.13.1",
"@vite-pwa/nuxt": "^0.10.5",
"@vueuse/core": "^10.10.0",
"axios": "^1.7.7",
"class-variance-authority": "^0.7.0",
Expand Down
Loading

0 comments on commit 45476cf

Please sign in to comment.