-
Notifications
You must be signed in to change notification settings - Fork 2
/
nuxt.config.ts
95 lines (94 loc) · 2.09 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
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
import inject from '@rollup/plugin-inject'
import { defineNuxtConfig } from 'nuxt/config'
import pkg from './package.json'
export default defineNuxtConfig({
app: {
head: {
charset: 'utf-8',
htmlAttrs: {
lang: 'en',
},
link: [
{
href: `https://fonts.googleapis.com`,
rel: `preconnect`,
},
{
href: `https://fonts.gstatic.com`,
rel: `preconnect`,
crossorigin: 'anonymous',
},
{
href: `https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600&family=Roboto:wght@300&display=swap`,
rel: `preload`,
as: `style`,
onload: `this.rel='stylesheet'`,
},
{
rel: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: '/favicon-32x32.png',
},
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: '/favicon-16x16.png',
},
{ rel: 'manifest', href: '/site.webmanifest' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#5bbad5' },
],
meta: [
{
hid: 'description',
name: 'description',
content: pkg.description,
},
{ name: 'msapplication-TileColor', content: '#da532c' },
{ name: 'theme-color', content: '#ffffff' },
],
title: pkg.name,
},
},
css: ['@/assets/styles/global.scss'],
devtools: { enabled: false },
image: {
dir: 'assets/images',
},
modules: ['@nuxt/image'],
ssr: true,
vite: {
optimizeDeps: {
esbuildOptions: {
define: { global: 'globalThis' },
plugins: [NodeGlobalsPolyfillPlugin({ buffer: true })],
},
},
build: {
assetsInlineLimit: 0,
target: 'esnext',
commonjsOptions: { transformMixedEsModules: true },
rollupOptions: {
plugins: [
inject({
Buffer: ['buffer', 'Buffer'],
}),
],
},
},
resolve: {
alias: {
'readable-stream': 'vite-compatible-readable-stream',
stream: 'vite-compatible-readable-stream',
},
},
},
compatibilityDate: '2024-07-26',
})