-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
90 lines (89 loc) · 2.64 KB
/
nuxt.config.ts
File metadata and controls
90 lines (89 loc) · 2.64 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
import tailwind from "@tailwindcss/vite";
import { HourTypeLabels } from "./app/utils/api/strings";
export default defineNuxtConfig({
app: {
head: {
title: "Attendance",
htmlAttrs: {
class: "dark",
},
link: [{ rel: "icon", type: "image/png", href: "/favicon.png" }],
meta: [
{
name: "viewport",
content: "width=device-width, initial-scale=1",
},
],
},
},
components: [
{ path: "~/components/ui/form/otp", prefix: "OTP" },
{ path: "~/components/editor", prefix: "Editor" },
{ path: "~/components/sidebar", prefix: "Sidebar" },
{ path: "~/components/attendance", prefix: "Attendance" },
{ path: "~/components/attendance/dialog", prefix: "Attendance" },
{ path: "~/components/widget", prefix: "Widget" },
{ path: "~/components/telemetry", prefix: "Telemetry" },
{ path: "~/components", pathPrefix: false },
],
nitro: {
routeRules: {
"/**": {
headers: {
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Opener-Policy": "same-origin",
},
},
},
prerender: {
routes: Object.keys(HourTypeLabels).map(
(type) => `/attendance/${type}`,
),
},
},
devtools: { enabled: false },
modules: ["@nuxt/icon", "@vueuse/nuxt", "vue-sonner/nuxt"],
pages: true,
css: ["~/style/tailwind.css"],
postcss: {
plugins: {
autoprefixer: {},
},
},
vite: {
plugins: [
tailwind(),
{
name: "headers",
configureServer(server) {
server.middlewares.use((req, res, next) => {
res.setHeader(
"Cross-Origin-Embedder-Policy",
"require-corp",
);
res.setHeader(
"Cross-Origin-Opener-Policy",
"same-origin",
);
next();
});
},
},
],
worker: {
format: "es",
},
build: {
rollupOptions: {
external: ["/wasm/attendance_crypto.js"],
},
},
},
icon: {
serverBundle: {
collections: ["hugeicons"],
},
},
ssr: false,
compatibilityDate: "2025-08-18",
});