-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
75 lines (63 loc) · 1.87 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
import { defineNuxtConfig } from 'nuxt/config'
const IN_DEVELOPMENT = process.env.NODE_ENV !== 'production'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
htmlAttrs: {
lang: 'de-CH',
},
bodyAttrs: {
// class: process.env.NODE_ENV === 'production' ? 'bg-gray-100' : 'bg-gray-200',
},
},
},
modules: ['@vueuse/nuxt', '@nuxtjs/tailwindcss'],
runtimeConfig: {
KV_URL: process.env.KV_URL,
KV_REST_API_URL: process.env.KV_REST_API_URL,
KV_REST_API_TOKEN: process.env.KV_REST_API_TOKEN,
KV_REST_API_READ_ONLY_TOKEN: process.env.KV_REST_API_READ_ONLY_TOKEN,
SPARKPOST_API_KEY: process.env.SPARKPOST_API_KEY,
public: {
APP_URL: process.env.APP_URL,
},
},
devtools: {
enabled: IN_DEVELOPMENT,
},
tailwindcss: {
cssPath: '~/assets/css/app.css',
viewer: false,
},
components: [
// We do not want global to be set to true for all components: https://nuxt.com/docs/guide/directory-structure/components#dynamic-components
// Instead, it can be set on a per-directory basis or the components can be resolved in their respective loader-components.
// Global should only be set to true for components used through <Component :is="..." />. (Blueprints and Statamic-Components in our case)
{ path: '~/components', global: false, pathPrefix: false },
{
path: '~/components/cms/blueprint',
global: true,
prefix: 'Blueprint',
},
{
path: '~/components/cms/hero',
global: true,
prefix: 'Hero',
},
{
path: '~/components/cms/component',
global: true,
prefix: 'Component',
},
],
postcss: {
plugins: {
'postcss-import': {},
'@tailwindcss/nesting': 'postcss-nesting',
tailwindcss: {},
autoprefixer: {},
},
},
build: {},
})