-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
101 lines (100 loc) · 2.48 KB
/
nuxt.config.ts
File metadata and controls
101 lines (100 loc) · 2.48 KB
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
import env from 'dotenv';
env.config();
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: false,
compatibilityDate: '2024-11-15',
devtools: { enabled: true },
modules: [
'@nuxt/eslint',
'@nuxt/image',
'@nuxtjs/tailwindcss',
'@nuxt/icon',
'shadcn-nuxt',
'@sidebase/nuxt-auth',
],
build: {
transpile: ['vue-toastification']
},
nitro: {
preset: 'bun',
routeRules: {
'/api/**': {
cors: true,
headers: {
'Access-Control-Allow-Origin': process.env.CORS_ALLOWED_ORIGIN || '',
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
'Access-Control-Allow-Credentials': 'true'
}
}
}
},
auth: {
isEnabled: true,
disableServerSideAuth: false,
baseURL: process.env.AUTH_API_BASE_URL || 'http://localhost:3000/api/auth',
provider: {
type: 'authjs',
},
sessionRefresh: {
enablePeriodically: true,
enableOnWindowFocus: true,
},
globalAppMiddleware: {
isEnabled: true,
allow404WithoutAuth: true,
},
},
eslint: {},
css: ['~/assets/css/fonts.css', '~/assets/css/main.css', 'vue-toastification/dist/index.css'],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
components: [
{
path: './components/app',
},
{
path: './components/common',
},
],
shadcn: {
/**
* Prefix for all the imported component
*/
prefix: '',
/**
* Directory that the component lives in.
* @default "./components/ui"
*/
componentDir: './components/ui',
},
runtimeConfig: {
DATABASE_USER: process.env.DATABASE_USER,
DATABASE_HOST: process.env.DATABASE_HOST,
DATABASE_NAME: process.env.DATABASE_NAME,
DATABASE_PASSWORD: process.env.DATABASE_PASSWORD,
DATABASE_PORT: process.env.DATABASE_PORT,
JWT_SECRET: process.env.JWT_SECRET,
NODE_ENV: process.env.NODE_ENV,
PRINT_LABELS_URL: process.env.PRINT_LABELS_URL,
GOOGLE_CLIENT_ID: process.env.GOOGLE_CLIENT_ID,
GOOGLE_CLIENT_SECRET: process.env.GOOGLE_CLIENT_SECRET,
AUTH_SECRET: process.env.AUTH_SECRET,
CORS_ALLOWED_ORIGIN: process.env.CORS_ALLOWED_ORIGIN,
},
app: {
head: {
charset: 'utf-8',
viewport: 'width=device-width, initial-scale=1',
title: 'Labsyncro',
},
},
devServer: {
host: '0.0.0.0',
},
});