generated from becem-gharbi/directus-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
74 lines (66 loc) · 1.5 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
import { naiveui, tailwindcss, directus } from "./config";
export default defineNuxtConfig({
ssr: true,
app: {
head: {
title: "Directus starter",
htmlAttrs: {
lang: "en",
},
link: [
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
{
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossorigin: "anonymous",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600&display=swap",
},
],
},
},
gtag: {
id: process.env.GTAG_MEASUREMENT_ID,
},
css: ["~/assets/styles/main.css"],
modules: [
"@bg-dev/nuxt-naiveui",
"@bg-dev/nuxt-directus",
"@nuxtjs/tailwindcss",
"nuxt-security",
"nuxt-gtag",
],
naiveui,
tailwindcss,
directus,
security: {
corsHandler: {
origin: process.env.DIRECTUS_REST_NUXT_BASE_URL,
methods: "*",
},
headers: {
crossOriginEmbedderPolicy: false,
contentSecurityPolicy: {
"img-src": [
"'self'",
"data:",
"blob:",
"https://ui-avatars.com",
"https://www.googletagmanager.com",
process.env.DIRECTUS_REST_BASE_URL || "http://127.0.0.1:8055",
],
},
},
},
runtimeConfig: {
public: {
defaultRoleId: process.env.DIRECTUS_DEFAULT_ROLE_ID,
bugsnag: {
enabled: false,
apiKey: process.env.BUGSNAG_API_KEY,
},
},
},
});