-
-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathnuxt.config.ts
98 lines (90 loc) · 1.92 KB
/
nuxt.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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",
"shadcn-nuxt",
],
nitro: {
devProxy: {
"/api": {
target: "http://localhost:7745/api",
ws: true,
changeOrigin: true,
},
},
},
app: {
head: {
script: [{ src: "/set-theme.js" }],
},
},
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",
});