forked from Readpato/schrodinger-hat-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
40 lines (38 loc) · 1.12 KB
/
vite.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
import { URL, fileURLToPath } from 'node:url'
import { defineConfig } from 'vite'
import UnoCSS from 'unocss/vite'
import vue from '@vitejs/plugin-vue'
const sassAdditionalData = () => {
let additionalData = '@use "sass:math";'
additionalData += '@import "@/styles/global";'
return additionalData
}
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'@components': fileURLToPath(new URL('./src/components', import.meta.url)),
'@functions': fileURLToPath(new URL('./src/functions', import.meta.url)),
'@i18n': fileURLToPath(new URL('./src/i18n', import.meta.url)),
'@pages': fileURLToPath(new URL('./src/pages', import.meta.url)),
'@utils': fileURLToPath(new URL('./src/utils', import.meta.url)),
// See https://github.com/intlify/vue-i18n-next/issues/789
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
},
},
css: {
preprocessorOptions: {
scss: {
additionalData: sassAdditionalData(),
},
},
},
plugins: [
vue({
script: {
defineModel: true,
},
}),
UnoCSS(),
],
})