forked from Tresjs/lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
105 lines (104 loc) · 2.42 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
import { presetUno, presetIcons, presetTypography, presetWebFonts } from 'unocss'
import glsl from 'vite-plugin-glsl'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
title: 'TresJS Playground',
link: [
{
rel: 'icon',
type: 'image/svg',
href: '/favicon.svg',
},
],
},
},
modules: ['@unocss/nuxt', 'nuxt-svgo', '@nuxt/content', '@nuxt/image-edge'],
css: ['@unocss/reset/tailwind-compat.css'],
vue: {
compilerOptions: {
isCustomElement: tag => tag.startsWith('Tres') && tag !== 'TresCanvas',
},
},
unocss: {
// presets
theme: {
colors: {
primary: '#82DBC5',
secondary: '#0f0',
accent: '#00f',
},
},
presets: [
presetUno(),
presetIcons({
scale: 1.2,
warn: true,
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle',
// ...
},
}),
presetTypography({
cssExtend: {
blockquote: {
padding: '1rem',
'border-radius': '0.5rem',
background: '#efefef',
},
pre: {
background: '#333e50 !important',
},
img: {
margin: '2rem auto',
'border-radius': '0.5rem',
},
code: {
'font-family': 'DM Mono',
'font-size': '0.875rem',
},
/* code: {
'font-family': 'Fira Code',
'font-size': '0.875rem',
}, */
':not(pre)>code': {
background: '#e8e8e8 !important',
padding: '0.25rem 0.5rem !important',
},
'code::after': {
content: 'none',
},
'code::before': {
content: 'none',
},
},
}),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
// core options
shortcuts: [],
rules: [],
},
content: {
highlight: {
theme: {
// Default theme (same as single string)
default: 'github-dark',
// Theme used if `html.sepia`
sepia: 'monokai',
},
preload: ['bash', 'css', 'javascript', 'json', 'markdown', 'scss', 'vue', 'glsl'],
},
},
vite: {
plugins: [glsl()],
},
})