mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
86 lines
1.8 KiB
TypeScript
86 lines
1.8 KiB
TypeScript
import { defineNuxtConfig } from "nuxt/config";
|
|
|
|
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
|
export default defineNuxtConfig({
|
|
ssr: false,
|
|
|
|
build: {
|
|
transpile: ["vue-i18n"],
|
|
},
|
|
|
|
modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt", "@vueuse/nuxt", "@vite-pwa/nuxt", "unplugin-icons/nuxt"],
|
|
|
|
nitro: {
|
|
devProxy: {
|
|
"/api": {
|
|
target: "http://localhost:7745/api",
|
|
ws: true,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
css: ["@/assets/css/main.css"],
|
|
|
|
pwa: {
|
|
workbox: {
|
|
navigateFallbackDenylist: [/^\/api/],
|
|
cleanupOutdatedCaches: true,
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^\/api/,
|
|
handler: "NetworkFirst",
|
|
method: "GET",
|
|
options: {
|
|
cacheName: "api-cache",
|
|
cacheableResponse: { statuses: [0, 200] },
|
|
expiration: { maxAgeSeconds: 60 * 60 * 24 },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
registerType: "autoUpdate",
|
|
injectRegister: "script",
|
|
injectManifest: {
|
|
swSrc: "sw.js",
|
|
},
|
|
devOptions: {
|
|
// Enable to troubleshoot during development
|
|
enabled: false,
|
|
},
|
|
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",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
postcss: {
|
|
plugins: {
|
|
tailwindcss: {},
|
|
autoprefixer: {},
|
|
},
|
|
},
|
|
|
|
compatibilityDate: "2024-11-29",
|
|
});
|