-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
108 lines (96 loc) · 2.37 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
// https://nuxt.com/docs/api/configuration/nuxt-config
const dev = process.env.NODE_ENV === 'development'
export default defineNuxtConfig({
runtimeConfig: {
unsplashAccessKey: '',
origin: '',
},
// https://nuxt.com/modules/umami
extends: ['nuxt-umami'],
routeRules: {
'/': { ssr: false },
'/api/unsplash/**': {
security: {
rateLimiter: {
tokensPerInterval: 3,
interval: 'hour',
fireImmediately: true,
},
},
},
},
modules: [
'@unocss/nuxt',
'@vueuse/nuxt',
'@vue-macros/nuxt',
'@nuxthq/ui',
'@nuxt/image',
'dayjs-nuxt',
'nuxt-security',
],
security: {
headers: {
crossOriginEmbedderPolicy: dev ? 'unsafe-none' : 'require-corp',
crossOriginResourcePolicy: 'same-site',
contentSecurityPolicy: {
'img-src': ['\'self\'', 'data:', 'images.unsplash.com'],
},
referrerPolicy: 'origin-when-cross-origin',
},
xssValidator: {
stripIgnoreTag: true,
},
},
// https://image.nuxtjs.org/configuration
image: {
domains: [
'https://images.unsplash.com',
],
alias: {
unsplash: 'https://images.unsplash.com',
},
screens: {
xs: 320,
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
xxl: 1536,
},
densities: [1, 2, 3],
unsplash: {},
},
// https://github.com/fumeapp/dayjs
dayjs: {
plugins: ['timezone'],
defaultTimezone: '',
},
macros: {},
css: [
'@unocss/reset/tailwind.css',
'@/style/global.css',
'@/style/var.css',
],
devtools: { enabled: true },
app: {
head: {
htmlAttrs: {
lang: 'zh-en',
},
title: 'Elegant Tab',
meta: [
{ name: 'author', content: 'ChangJun' },
{ name: 'description', content: 'a elegant tab page' },
{ name: 'og:title', content: 'Elegant Tab' },
{ name: 'og:type', content: 'website' },
{ name: 'og:url', content: 'https://52chinaweb.com/' },
],
link: [
{ rel: 'apple-touch-icon', sizes: '180x180', href: '/img/tab-apple-touch-icon.png' },
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/img/tab-favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/img/tab-favicon-16x16.png' },
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
],
},
},
})