-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
85 lines (85 loc) · 1.84 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: false,
css: ["~/assets/css/main.css"],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
runtimeConfig: {
backendUrl: "",
public: {
backendUrl: "",
},
},
modules: [
"nuxt-icon",
"nuxt-headlessui",
"@nuxt/image",
"@nuxtjs/i18n",
"@pinia/nuxt",
"@nuxt/devtools",
"@sidebase/nuxt-auth",
"@vee-validate/nuxt",
],
devtools: { enabled: true },
// Optionally change the default prefix.
headlessui: {
prefix: "",
},
image: {
dir: "assets/img",
},
i18n: {
/* module options */
},
imports: {
dirs: ["./stores"],
},
pinia: {
autoImports: [
// automatically imports `defineStore`
"defineStore", // import { defineStore } from 'pinia'
["defineStore", "definePiniaStore"], // import { defineStore as definePiniaStore } from 'pinia'
],
},
auth: {
baseURL: `${process.env.NUXT_BACKEND_URL}/api/users`,
provider: {
type: "local",
pages: {
login: "/login",
},
sessionDataType: {
refresh: "string",
access: "string",
id: "number",
_id: "number",
username: "string",
email: "string",
name: "string",
isAdmin: "boolean",
token: "string",
},
endpoints: {
signIn: { path: "/login/", method: "post" },
signOut: { path: "/logout/", method: "post" },
getSession: { path: "/session/", method: "post" },
},
token: {
maxAgeInSeconds: 60 * 60 * 1,
},
},
session: {
enableRefreshOnWindowFocus: true,
enableRefreshPeriodically: false,
},
globalAppMiddleware: true,
},
veeValidate: {
// disable or enable auto imports
autoImports: true,
},
});