generated from directus-labs/agency-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
139 lines (121 loc) · 3.54 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
133
134
135
136
137
138
139
// import { formatFonts } from './utils/fonts';
import { theme } from './theme';
export default defineNuxtConfig({
// https://nuxt.com/docs/api/configuration/nuxt-config
extends: [
'./layers/portal', // Client portal module
'./layers/proposals', // Proposals module
],
components: [
// Disable prefixing base components with `Base`
{ path: '~/components/base', pathPrefix: false },
// Auto import components from `~/components`
'~/components',
],
css: ['~/assets/css/tailwind.css', '~/assets/css/main.css'],
modules: [
// '@formkit/nuxt', // https://formkit.com/getting-started/installation#with-nuxt
'@nuxt/devtools', // https://devtools.nuxtjs.org/
'@nuxt/image',
'@nuxt/ui',
'@nuxtjs/color-mode',
'@nuxtjs/google-fonts',
'@vueuse/motion/nuxt', // https://motion.vueuse.org/nuxt.html
'@vueuse/nuxt', // https://vueuse.org/
'nuxt-icon', // https://github.com/nuxt-modules/icon
'nuxt-og-image',
'nuxt-schema-org', // https://nuxtseo.com/schema-org/guides/quick-setup
'nuxt-simple-sitemap', // https://nuxtseo.com/sitemap/getting-started/how-it-works
// '@nuxtjs/tailwindcss', // https://tailwindcss.nuxtjs.org/ Removed because of Nuxt UI already includes this
],
experimental: {
componentIslands: true,
asyncContext: true, // https://nuxt.com/docs/guide/going-further/experimental-features#asynccontext
appManifest: true,
},
runtimeConfig: {
public: {
siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'http://localhost:3000',
},
},
// Directus Configuration
directus: {
rest: {
baseUrl: process.env.DIRECTUS_URL,
nuxtBaseUrl: process.env.NUXT_PUBLIC_SITE_URL || 'http://localhost:3000',
},
auth: {
enabled: true,
enableGlobalAuthMiddleware: false, // Enable auth middleware on every page
userFields: ['*', { contacts: ['*'] }], // Select user fields
redirect: {
login: '/auth/signin', // Path to redirect when login is required
logout: '/', // Path to redirect after logout
home: '/portal', // Path to redirect after successful login
resetPassword: '/auth/reset-password', // Path to redirect for password reset
callback: '/auth/callback', // Path to redirect after login with provider
},
},
},
// Nuxt DevTools - https://devtools.nuxtjs.org/
devtools: { enabled: true },
ui: {
icons: 'all',
},
// Color Mode Configuration - https://color-mode.nuxtjs.org/
colorMode: {
classSuffix: '', // This is so we play nice with TailwindCSS
},
// Image Configuration - https://image.nuxt.com/providers/directus
image: {
provider: 'directus',
directus: {
baseURL: `${process.env.DIRECTUS_URL}/assets/`,
},
},
// Google Fonts Configuration - https://google-fonts.nuxtjs.org/
googleFonts: {
families: theme.googleFonts,
display: 'swap',
download: true,
},
site: {
url: process.env.NUXT_PUBLIC_SITE_URL || 'http://localhost:3000',
name: 'AgencyOS',
},
// OG Image Configuration - https://nuxtseo.com/og-image/getting-started/installation
ogImage: {
defaults: {
component: 'OgImageTemplate',
width: 1200,
height: 630,
},
// @TODO: Fix font families for OG Image
// fonts: formatFonts(fontFamilies),
},
// Sitemap Configuration - https://nuxtseo.com/sitemap/getting-started/how-it-works
sitemap: {
sitemaps: {
pages: {
exclude: ['/posts/**', '/help/**'],
},
posts: {
include: ['/posts/**'],
},
help: {
include: ['/help/**'],
},
},
},
postcss: {
plugins: {
'postcss-import': {},
'tailwindcss/nesting': {},
tailwindcss: {},
autoprefixer: {},
},
},
build: {
transpile: ['v-perfect-signature'],
},
});