-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuxt.config.ts
86 lines (85 loc) · 1.82 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
import path from 'path';
import fsSnippetsResolver from './vite/plugins/fs-snippets-resolver';
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: {
enabled: false
},
vue: {
propsDestructure: true
},
runtimeConfig: {
public: {
BASE_URL: process.env.VITE_API_URL
}
},
srcDir: './src/',
ssr: false,
css: ['~/assets/styles/globals.scss'],
components: {
dirs: [
{
path: '~/components/SVG',
global: true,
prefix: 'SVG'
},
'~/components'
]
},
app: {
head: {
link: [
{
rel: 'preload',
href: '/fonts/RobotoFlex/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].woff2',
as: 'font',
type: 'font/woff2',
crossorigin: 'anonymous'
}
]
}
},
vite: {
plugins: [fsSnippetsResolver('folder-snippets.json')],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@request': path.resolve(
__dirname,
'./src/common/request.ts'
)
}
},
css: {
preprocessorOptions: {
scss: {
additionalData:
"@import '~/assets/styles/_vars.scss';\n"
}
},
modules: {
generateScopedName: '[local]-v-[hash:base64:8]'
}
}
},
modules: ['@nuxtjs/i18n', '@nuxt/eslint'],
plugins: ['~/plugins/maska.ts'],
i18n: {
vueI18n: './i18n.config.ts',
defaultLocale: 'ru',
langDir: './locales',
lazy: true,
locales: [
{
code: 'en',
file: 'ru-RU/index.ts', // TODO: Подключить язык en-EN/index.ts
name: 'English'
},
{
code: 'ru',
file: 'ru-RU/index.ts',
name: 'Русский'
}
]
}
});