-
Notifications
You must be signed in to change notification settings - Fork 5
/
nuxt.config.ts
49 lines (49 loc) · 1.17 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
// https://nuxt.com/docs/api/configuration/nuxt-config
import { TOKEN_KEY } from './constants/';
export default defineNuxtConfig({
devtools: { enabled: true },
ssr: false,
modules: [
'@bg-dev/nuxt-naiveui',
'@nuxtjs/tailwindcss',
'nuxt-icon',
'@nuxtjs/i18n',
'@nuxtjs/apollo',
],
tailwindcss: {
exposeConfig: true,
},
i18n: {
locales: [
{ code: 'en', iso: 'en-US', file: 'en-US.json', name: 'English' },
{ code: 'fr', iso: 'fr-FR', file: 'fr-FR.json', name: 'Français' },
{ code: 'lo', iso: 'lo-LA', file: 'lo-LA.json', name: 'ລາວ' },
],
lazy: true,
langDir: 'locales/',
defaultLocale: 'en',
},
runtimeConfig: {
public: {
authApi: process.env.NUXT_AUTH_API,
},
},
apollo: {
autoImports: true,
authType: 'Bearer',
authHeader: 'Authorization',
tokenStorage: 'cookie',
proxyCookies: true,
clients: {
default: {
httpLinkOptions: {
credentials: 'include',
},
httpEndpoint: `${process.env.NUXT_AUTH_GRAPHQL}`,
websocketsOnly: false,
tokenName: TOKEN_KEY,
authHeader: 'Authorization',
},
},
},
});