forked from mirrors/homebox
feat: pwa support (#366)
* add PWA support * fix broken URLs for query * remove unused variable * restore authURL
This commit is contained in:
parent
be6b5c9c56
commit
0f8db862b4
8 changed files with 1656 additions and 7 deletions
|
@ -3,7 +3,7 @@ import { defineNuxtConfig } from "nuxt/config";
|
|||
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
||||
export default defineNuxtConfig({
|
||||
ssr: false,
|
||||
modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt", "@vueuse/nuxt"],
|
||||
modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt", "@vueuse/nuxt", "@vite-pwa/nuxt"],
|
||||
nitro: {
|
||||
devProxy: {
|
||||
"/api": {
|
||||
|
@ -13,4 +13,39 @@ export default defineNuxtConfig({
|
|||
},
|
||||
},
|
||||
css: ["@/assets/css/main.css"],
|
||||
pwa: {
|
||||
injectRegister: "script",
|
||||
injectManifest: {
|
||||
swSrc: "sw.js",
|
||||
},
|
||||
devOptions: {
|
||||
// Enable to troubleshoot during development
|
||||
enabled: true,
|
||||
},
|
||||
manifest: {
|
||||
name: "Homebox",
|
||||
short_name: "Homebox",
|
||||
description: "Home Inventory App",
|
||||
theme_color: "#5b7f67",
|
||||
start_url: "/home",
|
||||
icons: [
|
||||
{
|
||||
src: "pwa-192x192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
},
|
||||
{
|
||||
src: "pwa-512x512.png",
|
||||
sizes: "512x512",
|
||||
type: "image/png",
|
||||
purpose: "any maskable",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue