forked from emirkabal/masterscore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
174 lines (161 loc) · 4.41 KB
/
Copy pathnuxt.config.ts
File metadata and controls
174 lines (161 loc) · 4.41 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// https://nuxt.com/docs/api/configuration/nuxt-config
import icons from "./config/icons"
import i18n from "./config/modules/i18n"
import { version } from "./package.json"
const isDev = process.env.NODE_ENV === "development"
export default defineNuxtConfig({
srcDir: "src/",
ssr: true,
spaLoadingTemplate: "./app/spa-loading-template.html",
devtools: {
enabled: true
},
modules: [
["@nuxtjs/i18n", i18n],
"@nuxt/image",
"@pinia/nuxt",
[
"shadcn-nuxt",
{
componentDir: "src/components/ui"
}
],
"nuxt-headlessui",
[
"@nuxtjs/device",
{
refreshOnResize: true
}
],
"@vite-pwa/nuxt",
"@nuxt/icon"
],
css: [
"~/assets/css/main.css",
"vue3-emoji-picker/css",
"@fontsource/inter/400.css",
"@fontsource/inter/600.css",
"@fontsource/inter/800.css",
"@fontsource/maven-pro/600.css",
"@fontsource/maven-pro/700.css",
"@fontsource/maven-pro/900.css"
],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
...(isDev ? {} : { cssnano: {} })
}
},
routeRules: {
"/**": isDev ? {} : { cache: { swr: true, maxAge: 120, staleMaxAge: 60, headersOnly: true } },
"/account/**": { ssr: false },
"/settings": { ssr: false }
},
nitro: {
routeRules: {
"/**": { isr: false }
}
},
app: {
head: {
title: "Masterscore",
htmlAttrs: {
lang: "en"
},
meta: [
{ charset: "utf-8" },
{
name: "viewport",
content: "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
},
{
// @ts-ignore
viewport: "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no",
mobileAppIOS: true
},
{ name: "mobile-web-app-capable", content: "yes" },
{ name: "full-screen", content: "yes" },
{ name: "browsermode", content: "application" },
{ name: "screen-orientation", content: "portrait" },
{
hid: "description",
name: "description",
content:
"Masterscore is a movie and TV review website with unbiased reviews, recommendations, and ratings on various genres. Find your next favorite show or movie with us!"
},
{ name: "theme-color", content: "#eab308" }
],
link: [
{
rel: "icon",
type: "image/x-icon",
href: "/favicon.ico"
}
]
}
},
appConfig: {
buildDate: new Date().toISOString(),
version
},
pwa: {
registerType: "autoUpdate",
srcDir: "src/",
manifest: {
name: "Masterscore",
short_name: "Masterscore",
description:
"Masterscore is a movie and TV review website with unbiased reviews, recommendations, and ratings on various genres. Find your next favorite show or movie with us!",
theme_color: "#eab308",
background_color: "#ffffff",
start_url: "/",
display: "fullscreen",
icons
},
client: {
installPrompt: true,
periodicSyncForUpdates: 20
}
// workbox: {
// navigateFallback: null,
// globDirectory: ".vercel/output",
// globPatterns: ["**/*.{js,css,html,png,svg,ico}"],
// globIgnores: ["**/node_modules/**"],
// runtimeCaching: [
// {
// urlPattern: "/api/.*",
// handler: "NetworkFirst",
// method: "GET",
// options: {
// cacheName: "api-cache",
// expiration: {
// maxEntries: 100,
// maxAgeSeconds: 60 * 60 * 24 * 7
// },
// cacheableResponse: {
// statuses: [0, 200]
// }
// }
// }
// ]
// }
},
runtimeConfig: {
MONGO_URI: process.env.MONGO_URI,
TMDB_API_KEY: process.env.TMDB_API_KEY,
UPSTASH_REDIS_REST_URL: process.env.UPSTASH_REDIS_REST_URL,
UPSTASH_REDIS_REST_TOKEN: process.env.UPSTASH_REDIS_REST_TOKEN,
SUPABASE_URL: process.env.SUPABASE_URL,
SUPABASE_KEY: process.env.SUPABASE_KEY,
INVITE_CODE: process.env.INVITE_CODE,
JWT_SECRET: process.env.JWT_SECRET,
VERSION: version,
public: {
SOCKET_SERVER: process.env.SOCKET_SERVER,
SUPABASE_STORAGE_URL: process.env.SUPABASE_URL + "/storage/v1/object/public/assets/",
TMDB_API_TOKEN: process.env.TMDB_API_TOKEN
}
},
compatibilityDate: "2024-07-27"
})