generated from ersankarimi/nuxt3-ui-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
126 lines (115 loc) · 2.98 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
118
119
120
121
122
123
124
125
126
import { resolve } from "node:path";
import process from "node:process";
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: "2024-11-01",
devtools: { enabled: true },
// Enable this to perform server-side rendering in your app.
ssr: false,
// CSS Configuration (https://nuxt.com/docs/api/nuxt-config#css)
css: ["@/assets/css/app.css"],
// Enable type-checking at build time (https://nuxt.com/docs/guide/concepts/typescript)
typescript: {
typeCheck: true,
},
// Nuxt TailwindCSS Configuration (https://tailwindcss.nuxtjs.org/)
tailwindcss: {
cssPath: "@/assets/css/app.css",
configPath: "tailwind.config.js",
},
// Nuxt Image Configuration (https://image.nuxt.com/advanced/static-images)
nitro: {
prerender: {
routes: ["/_ipx/_/dots.svg", "/_ipx/_/circle-blur.svg"],
},
},
modules: [
"@nuxt/ui",
"@nuxt/image",
"@nuxt/fonts",
"@pinia/nuxt",
"@sidebase/nuxt-auth",
"nuxt-icons",
"@nuxtjs/supabase",
],
colorMode: {
preference: "system", // default value of $colorMode.preference
fallback: "dark", // fallback value if not system preference found
},
// Nuxt Font Configuration (https://fonts.nuxt.com)
fonts: {
defaults: {
subsets: ["latin"],
weights: [400, 700],
},
families: [
{
name: "Manrope",
display: "swap",
provider: "google",
},
],
},
// @sidebase/nuxt-auth Configuration (https://auth.sidebase.io/)
// https://auth.sidebase.io/guide/local/quick-start
// On this example, we are using the local provider.
auth: {
baseURL: `${process.env.NUXT_PUBLIC_API_URL}/`,
provider: {
type: "local",
pages: {
login: "auth/login",
},
endpoints: {
signIn: {
path: "auth/login",
method: "post",
},
getSession: {
path: "auth/me",
method: "get",
},
signOut: false,
},
refresh: {
isEnabled: true,
endpoint: {
path: "auth/refresh",
method: "post",
},
token: {
refreshRequestTokenPointer: "/refreshToken",
signInResponseRefreshTokenPointer: "/accessToken",
cookieName: "auth.token",
maxAgeInSeconds: 3600,
},
},
token: {
signInResponseTokenPointer: "/accessToken",
type: "Bearer",
cookieName: "auth.token",
headerName: "Authorization",
maxAgeInSeconds: 3600,
},
},
},
// Runtime Config (https://nuxt.com/docs/api/nuxt-config#runtimeconfig-1)
runtimeConfig: {
public: {
API_URL: process.env.NUXT_PUBLIC_API_URL,
},
},
supabase: {
url: process.env.NUXT_PUBLIC_SUPABASE_URL,
key: process.env.NUXT_PUBLIC_SUPABASE_KEY,
redirect: false,
},
vite: {
resolve: {
alias: {
cookie: resolve(__dirname, "node_modules/cookie"),
},
},
},
});
// vim: set ts=2 sw=2 sts=2: