-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
120 lines (112 loc) · 3 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
const siteTitle = 'Laboratory PWA';
/*
* Nuxt 3 Config File
Usage: https://nuxt.com/docs/api/configuration/nuxt-config
*/
export default defineNuxtConfig({
/**
* * App Config
* app config: https://nuxt.com/docs/api/configuration/nuxt-config#app
* head config: https://nuxt.com/docs/api/configuration/nuxt-config#head
* meta config: https://nuxt.com/docs/getting-started/seo-meta
* pageTransition config: https://nuxt.com/docs/getting-started/transitions#transitions
* TODO: Add more meta tags for SEO
* TODO: Add tags for social media sharing
* TODO: Migrate apple-touch-icon config to manifest.json
*/
app: {
head: {
title: siteTitle, // App window nav title
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'theme-color', content: '#121212' },
// ...
],
link: [
{ rel: 'manifest', href: 'pwa/manifest.json' },
{ rel: 'apple-touch-icon', href: 'pwa/icons/apple-touch-icon.png' },
],
},
pageTransition: { name: 'page', mode: 'out-in' },
},
css: ['vuetify/lib/styles/main.sass'],
build: {
transpile: ['vuetify'],
},
vite: {
define: {
'process.env.DEBUG': false,
},
},
/**
* * Nuxt 3 Modules
* Official modules: https://nuxt.com/modules
*/
modules: [
'nuxt-icon',
'@nuxtjs/i18n',
'@nuxt/content',
'@nuxtjs/color-mode',
'@nuxtjs/tailwindcss',
],
components: {
dirs: ['~/components', '~/components/library'],
},
/**
* * Tailwind CSS Config
* Options: https://tailwindcss.nuxt.dev/getting-started/options/
* Docs: https://tailwindcss.nuxt.dev
*/
tailwindcss: {
cssPath: '~/assets/tailwind.css',
configPath: 'tailwind.config',
exposeConfig: true, // true to resolve the tailwind config in runtime. https://tailwindcss.nuxt.dev/getting-started/options/#exposeconfig
injectPosition: 0,
viewer: true, // set up the /_tailwind/ route. (Disable in production) https://tailwindcss.nuxt.dev/getting-started/options/#viewer
},
/**
* * i18n Config
* Official module: https://nuxt.com/modules/i18n
*/
i18n: {
defaultLocale: 'en',
detectBrowserLanguage: false,
langDir: 'lang/',
lazy: true,
locales: [
{
code: 'es',
file: 'es.json',
iso: 'es-ES',
name: 'Español',
},
{
code: 'en',
file: 'en.json',
iso: 'en-US',
name: 'English',
},
],
},
/**
* * Color mode Config
* Official module: https://nuxt.com/modules/color-mode
*/
colorMode: {
classSuffix: '',
},
/**
* * Runtime Config (Environment Variables)
* Usage: https://nuxt.com/docs/guide/going-further/runtime-config
*/
runtimeConfig: {
// The private keys which are only available server-side
apiSecret: '123',
// Keys within public are also exposed client-side
public: {
apiBase: '/api',
BEARER_TOKEN: process.env.NUXT_BEARER_TOKEN,
},
},
});