-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
96 lines (94 loc) · 2.28 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
import NodeGlobalsPolyfillPlugin from '@esbuild-plugins/node-globals-polyfill'
import commonjs from '@rollup/plugin-commonjs'
import inject from '@rollup/plugin-inject'
export default defineNuxtConfig({
meta: {
title: 'Voice',
meta: [{
name: 'viewport',
content: 'width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'
}, {
hid: 'keywords',
name: 'keywords',
content: '',
}, {
hid: 'description',
name: 'description',
content: 'ECHO',
}],
link: [{
rel: 'icon',
href: '/favicon.ico',
type: 'image/x-icon'
}, {
ref: 'apple-touch-icon',
sizes: '180x180',
href: '/apple-touch-icon.png'
}, {
rel: 'preconnect',
href: 'https://fonts.googleapis.com'
}, {
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossOrigin: ''
}, {
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'
}],
script: [{
src: 'https://analytics.0xecho.com/js/plausible.js',
'data-domain': '0xvoice.com',
defer: true
}]
},
buildModules: [
'@pinia/nuxt',
],
css: [
'remixicon/fonts/remixicon.css',
'element-plus/dist/index.css',
'@/styles/_element-plus.scss',
'@/styles/_base.scss',
'@/styles/themes/_default.scss',
'@/styles/highlight/github.scss'
],
vite: {
// plugins: [eslintPlugin()],
plugins: [
// polyfillExports(),
// commonjs(),
// inject({ Buffer: ['buffer', 'Buffer'] })
],
optimizeDeps: {
esbuildOptions: {
// Fix global is not defined error
define: {
global: 'globalThis'
},
plugins: [
// Without this, npm run dev will output Buffer or process is not defined error
NodeGlobalsPolyfillPlugin({
buffer: true
})
]
}
},
build: {
rollupOptions: {
// plugins: [nodePolyfills()],
// output: { format: 'cjs' }
},
commonjsOptions: {
transformMixedEsModules: false
}
},
css: {
preprocessorOptions: {
scss: {
additionalData: '@import "@/styles/_var.scss";',
}
}
}
},
ssr: false
})