-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
81 lines (69 loc) · 1.72 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
import { defineNuxtConfig } from 'nuxt/config'
import Aura from '@primevue/themes/aura'
import { execSync } from 'child_process'
import { version } from './package.json'
const revision = execSync('git rev-parse --short HEAD').toString().trim()
const isProduction = process.env.NODE_ENV === 'production'
// https://nuxt.com/docs/api/nuxt-config
export default defineNuxtConfig({
build: {
// fixing @babel/runtime issue in production build
transpile: [...(isProduction ? ['@babel/runtime'] : [])],
},
modules: [
'@nuxt/content',
'@nuxt/eslint',
'@nuxt/fonts',
'@nuxt/image',
'@nuxtjs/color-mode',
'@nuxtjs/device',
'@nuxtjs/supabase',
'@nuxtjs/tailwindcss',
'@pinia/nuxt',
'@primevue/nuxt-module',
'nuxt-og-image',
],
// just to bypass vercel deployment to use `pg` instead
content: {
database: {
type: 'd1',
binding: 'keebtalogue-db',
},
},
fonts: {
families: [{ name: 'Dosis', provider: 'google' }],
},
ogImage: {
defaults: {
component: 'Website',
},
fonts: ['Dosis:500', 'Dosis:600'],
},
supabase: {
redirect: false,
},
primevue: {
options: {
theme: {
preset: Aura,
options: {
darkModeSelector: '.dark-mode',
},
},
},
},
buildId: `v${version} (${revision})`,
runtimeConfig: {
public: {
appName: process.env.APP_NAME,
appDesc: process.env.APP_DESC,
baseUrl: process.env.BASE_URL,
donate: process.env.DONATE || 'https://www.buymeacoffee.com/anhthang',
},
},
routeRules: {
// pages generated on demand once until next deployment, cached on CDN
'/about': { prerender: true },
'/policy': { prerender: true },
},
})