-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
132 lines (131 loc) · 3.48 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
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
import { defineNuxtConfig } from "nuxt/config";
import { generateRoutes } from "./config/routes";
import { loadBuildings, loadRooms, loadSpaces } from "./src/data/load-data";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: "src/",
modules: [
"@pinia/nuxt",
"@nuxtjs/supabase",
"@vueuse/nuxt",
"@vite-pwa/nuxt",
],
css: ["@/components/app-core/index.css"],
app: {
head: {
title: "TU Delft Spacefinder",
link: [
{ rel: "icon", href: "/favicon.svg", type: "image/svg+xml" },
{ rel: "apple-touch-icon", href: "/apple-touch-icon.png" },
{ rel: "dns-prefetch", href: "https://api.mapbox.com/" },
{ rel: "dns-prefetch", href: "https://www.datocms-assets.com/" },
],
meta: [
{
name: "google-site-verification",
content: "zpj1hb-uMNGkFLJlxqC96oWE067G1lzXcRFsWM4m_8M",
},
],
script: [
{
src: "//siteimproveanalytics.com/js/siteanalyze_6005654.js",
defer: true,
},
],
},
},
build: {
transpile: ["floating-vue"],
},
runtimeConfig: {
internalSecret: process.env.INTERNAL_SECRET,
datoApiToken: process.env.DATO_API_TOKEN,
microsoftGraph: {
tenantId: '096e524d-6929-4030-8cd3-8ab42de0887b',
clientId: process.env.MICROSOFT_GRAPH_CLIENT_ID,
clientSecret: process.env.MICROSOFT_GRAPH_CLIENT_SECRET,
},
kafkaConfig: {
url: process.env.KAFKA_URL,
username: process.env.KAFKA_USERNAME,
password: process.env.KAFKA_PASSWORD,
groupId: "tud_wifi_jasper_moelker",
topics: [
"tud_aruba_access_point_client_counts",
],
},
schemaRegistry: {
url: process.env.SCHEMA_REGISTRY_URL,
username: process.env.SCHEMA_REGISTRY_USERNAME,
password: process.env.SCHEMA_REGISTRY_PASSWORD,
},
public: {
mapboxToken: process.env.MAPBOX_TOKEN,
baseUrl: process.env.URL,
spacesMode: process.env.SPACES_MODE ?? "spaces",
},
},
nitro: {
prerender: {
routes: ["/sitemap.xml", "/robots.txt"],
},
},
hooks: {
"prerender:routes": async ({ routes }) => {
const generatedRoutes = await Promise.all([
loadBuildings(),
loadSpaces(),
loadRooms(),
]).then(([buildings, spaces, rooms]) =>
generateRoutes({ buildings, spaces, rooms })
);
// routes is of type Set, so we need to add each route individually
generatedRoutes.forEach((route) => {
routes.add(route);
});
},
},
supabase: {
redirect: false,
},
pwa: {
registerType: "autoUpdate",
useCredentials: true,
workbox: {
globPatterns: ["_nuxt/*"],
navigateFallback: null,
runtimeCaching: [
{
urlPattern: "https://www.datocms-assets.com/.*",
handler: "CacheFirst",
method: "GET",
},
],
},
manifest: {
name: "TU Delft\nSpacefinder",
short_name: "Spacefinder",
background_color: "#00a6d6",
theme_color: "#00a6d6",
display: "standalone",
icons: [
{
src: "/favicon-192.png",
sizes: "192x192",
type: "image/png",
},
{
src: "/favicon-512.png",
sizes: "512x512",
type: "image/png",
},
{
src: "/favicon-512--maskable.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable",
},
],
},
},
});