generated from nujinDevelopment/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
91 lines (91 loc) · 2.29 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
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
title: 'Votion',
srcDir: './app',
devServer: {
port: 3001,
},
ssr: false,
modules: [
'@vueuse/nuxt',
'@sidebase/nuxt-auth',
'@nuxtjs/tailwindcss',
'@nuxtjs/color-mode',
'@pinia/nuxt',
'nuxt-lucide-icons',
'@kevinmarrec/nuxt-pwa'
],
plugins: [
{ src: '~/plugins/aos.ts', mode: 'client' },
{ src: '~/plugins/scrollBehavior.ts', mode: 'client' },
{ src: '~/plugins/markdown.ts', mode: 'client' },
{ src: '~/plugins/multiselect.ts', mode: 'client' },
],
nitro: {
serverAssets: [
{
baseName: '',
dir: 'uploads',
},
],
},
auth: {
// origin: '*',
globalAppMiddleware: true,
enableSessionRefreshPeriodically: 5000,
enableSessionRefreshOnWindowFocus: true,
globalMiddlewareOptions: {
allow404WithoutAuth: true, // Defines if the 404 page will be accessible while unauthenticated
addDefaultCallbackUrl: '/' // Where authenticated user will be redirected to by default
}
},
tailwindcss: { exposeConfig: true },
colorMode: {
preference: 'system', // default theme
dataValue: 'theme', // activate data-theme in <html> tag
classSuffix: ''
},
pinia: {
autoImports: [
'defineStore', // import { defineStore } from 'pinia'
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
],
},
// vite: {
// server: { // https://github.com/nuxt/nuxt/issues/12748#issuecomment-1397234566
// https: {
// // key: fs.readFileSync('.cert/localhost-key.pem'),
// // cert: fs.readFileSync('.cert/localhost-cert.pem'),
// },
// hmr: {
// // protocol: 'wss'
// }
// }
// },
pwa: {
registerType: 'autoUpdate',
manifest: {
name: 'Votion',
short_name: 'Votion',
theme_color: '#fff',
icons: [
{
src: 'favicon.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'favicon.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'favicon.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable',
},
],
},
}
})