-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
50 lines (40 loc) · 1.23 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
import eslintPlugin from 'vite-plugin-eslint'
import stylelintPlugin from 'vite-plugin-stylelint'
const isDev = process.env.NODE_ENV === 'development'
const isProd = process.env.NODE_ENV === 'production'
export default defineNuxtConfig({
modules: ['@pinia/nuxt'],
pinia: {
storesDirs: ['./store/modules']
},
// https://github.com/nuxt/nuxt/issues/20211
experimental: {
renderJsonPayloads: true
},
typescript: {
strict: true
},
// https://nuxt.com/docs/api/configuration/nuxt-config#css
css: ['@/assets/styles/main.scss'],
// https://nuxt.com/docs/api/configuration/nuxt-config#build
build: {
transpile: isProd
? ['naive-ui', 'vueuc', '@css-render/vue3-ssr', '@juggle/resize-observer']
: ['@juggle/resize-observer']
},
// https://nuxt.com/docs/api/configuration/nuxt-config#vite
vite: {
optimizeDeps: {
include: isDev ? ['naive-ui', 'vueuc', 'date-fns-tz/formatInTimeZone'] : []
},
css: {
preprocessorOptions: {
// https://nuxt.com/docs/getting-started/assets#global-styles-imports
scss: {
additionalData: '@use "@/assets/styles/global.scss" as *;'
}
}
},
plugins: isDev ? [eslintPlugin(), stylelintPlugin()] : []
}
})