-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
51 lines (51 loc) · 1.1 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
compatibilityDate: '2024-07-04',
srcDir: './src',
dir: {
public: '../public'
},
modules: [
'@nuxtjs/tailwindcss',
'@nuxtjs/google-fonts',
'@nuxt/icon',
'@nuxt/image',
'@nuxt/eslint'
],
tailwindcss: {
editorSupport: true,
configPath: './tailwind.config.ts'
},
googleFonts: {
families: {
'Noto Sans Thai': '100..900'
}
},
runtimeConfig: {
public: {
baseUrl:
'' ||
(process.env.NODE_ENV === 'production'
? 'https://wallpaper-a-day.vercel.app'
: 'http://localhost:3000')
}
},
routeRules: {
'/': { prerender: true },
'/gallery': { prerender: true },
'/posts': { ssr: true },
'/posts/**': { swr: true }
},
nitro: {
routeRules: {
'/api/posts/**': {
proxy:
'https://public-api.wordpress.com/rest/v1.1/sites/wallpaper-a-day.com/posts/**'
},
'/api/counts/**': {
proxy: process.env.COUNT_API_URL + '/**' || ''
}
}
}
})