-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
71 lines (70 loc) · 2.14 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
builder: 'webpack',
devtools: { enabled: true },
i18n: {
baseUrl: 'http://localhost:3000',
customRoutes: 'config',
defaultLocale: 'en',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
redirectOn: 'root', // recommended
},
langDir: 'locales',
lazy: true,
locales: [
{
code: 'en',
file: 'en.json',
iso: 'en-US',
name: 'English',
},
],
},
modules: [
'@hebilicious/authjs-nuxt',
'@nuxtjs/i18n', // https://v8.i18n.nuxtjs.org/options/vue-i18n
'@nuxtjs/tailwindcss', // https://tailwindcss.nuxtjs.org/getting-started/setup
'@pinia/nuxt' // https://pinia.vuejs.org/ssr/nuxt.html
],
// Optional default config
// authJs: {
// verifyClientOnEveryRequest: true,
// guestRedirectTo: "/", // where to redirect if the user is not authenticated
// authenticatedRedirectTo: "/", // where to redirect if the user is authenticated
// baseUrl: "" // should be something like https://www.my-app.com
// },
runtimeConfig: {
authJs: {
secret: process.env.NUXT_NEXTAUTH_SECRET // You can generate one with `openssl rand -base64 32`
},
github: {
clientId: process.env.NUXT_GITHUB_CLIENT_ID,
clientSecret: process.env.NUXT_GITHUB_CLIENT_SECRET
},
public: {
authJs: {
baseUrl: process.env.NUXT_NEXTAUTH_URL, // The URL of your deployed app (used for origin Check in production)
verifyClientOnEveryRequest: true // whether to hit the /auth/session endpoint on every client request
}
}
},
nitro: {
esbuild: {
options: {
tsconfigRaw: {
compilerOptions: {
experimentalDecorators: true
}
}
}
}
},
// TypeScript: https://nuxt.com/docs/getting-started/installation#prerequisites
typescript: {
includeWorkspace: true,
typeCheck: true,
shim: false, // For TypeScript Vue Plugin (Volar).
},
})