-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
117 lines (106 loc) · 2.38 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
css: ['~/assets/css/golbal.css',
'@fortawesome/fontawesome-svg-core/styles.css',
'vue-sweetalert-icons/dist/style.css'
],
vite: {
server: {
hmr: {
overlay: false,
},
},
},
pwa: {
manifest: {
name: 'Coding with Me',
short_name: 'CWM',
icons: [
{
src: '/logo-web-coding.png', // ใช้ path ตรงจาก public/
sizes: '192x192',
type: 'image/png'
},
{
src: '/logo-web-coding.png',
sizes: '512x512',
type: 'image/png'
}
],
start_url: '/',
display: 'fullscreen', // สำคัญสำหรับ TWA
theme_color: '#ffffff',
background_color: '#ffffff'
},
workbox:{
swDest: 'service-worker.js',
}
},
ssr: process.env.BUILD_MOBILE === 'true' ? false : true,
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
runtimeConfig:{
apiBase: process.env.API_BASE_URL || 'http://172.30.96.1:3089',
turnstile:{
secretKey: process.env.TURNSTILE_SECRET_KEY
},
public:{
ablyApiKey: process.env.ABLY_API_KEY,
backendApi: process.env.API_BASE_URL || 'http://172.30.96.1:3089'
}
},
build: {
transpile: ['@fortawesome/vue-fontawesome']
},
modules: [
["@nuxtjs/google-fonts",{families:{Kanit: [100,200,300,400,500,600,700,800,900]}}],
'@vueuse/nuxt',
"@sidebase/nuxt-auth",
"@nuxtjs/turnstile",
"dayjs-nuxt",
"@hypernym/nuxt-gsap",
'@vite-pwa/nuxt',
],
auth: {
provider: {
type: 'authjs',
trustHost: false,
defaultProvider: 'credentials',
addDefaultCallbackUrl: true
},
isEnabled: true,
disableServerSideAuth: false,
baseURL: process.env.BASE_URL + '/api/auth',
},
turnstile: {
siteKey: process.env.TURNSTILE_SITE_KEY,
},
dayjs: {
externalPlugins: [{
name: 'timezone',
package: 'dayjs/plugin/timezone',
}]
},
nitro:{
routeRules:{
'/**':{
headers:{
'Cross-Origin-Opener-Policy': 'unsafe-none',
}
}
}
},
app: {
head: {
link: [
{ rel: 'manifest', href: '/manifest.webmanifest' }
]
}
},
})