-
Notifications
You must be signed in to change notification settings - Fork 5
/
nuxt.config.ts
55 lines (48 loc) · 1.39 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
import process from 'node:process'
const silenceSomeSassDeprecationWarnings = {
verbose: true,
logger: {
warn(message: string, options: any) {
const { stderr } = process
const span = options.span ?? undefined
const stack = (options.stack === 'null' ? undefined : options.stack) ?? undefined
if (message.includes('Using / for division')) {
// silences above deprecation warning
return
}
if (options.deprecation)
stderr.write('DEPRECATION ')
stderr.write(`WARNING: ${message}\n`)
if (span !== undefined) {
// output the snippet that is causing this warning
stderr.write(`\n"${span.text}"\n`)
}
if (stack !== undefined) {
// indent each line of the stack
stderr.write(` ${stack.toString().trimEnd().replace(/\n/gm, '\n ')}\n`)
}
stderr.write('\n')
},
},
}
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
css: ['~/assets/scss/main.scss'],
alias: {
'@generated-api': '/<srcDir>/lib/api/__generated__',
},
modules: ['@vueuse/nuxt', '@nuxt/test-utils/module'],
vite: {
css: {
preprocessorOptions: {
scss: {
...silenceSomeSassDeprecationWarnings,
},
sass: {
...silenceSomeSassDeprecationWarnings,
},
},
},
},
})