-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
35 lines (32 loc) · 1.13 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
import { vitePluginVueComponentsConfig } from './config/vitePluginVueComponentsConfig'
import { vitePluginAutoImportConfig } from './config/vitePluginAutoImportConfig'
import vue from '@vitejs/plugin-vue'
import { viteCssConfig } from './config/viteCssConfig'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import { defineConfig } from 'vite'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
AutoImport(vitePluginAutoImportConfig), // auto-import vue composition API functions
Components(vitePluginVueComponentsConfig) // auto-import global vue components
],
// make core styling mixins/functions/variables available in all Vue components:
css: viteCssConfig,
// define path aliases:
resolve: {
alias: [
{ find: '@', replacement: path.resolve(__dirname, 'src') },
{
find: '@styles',
replacement: path.resolve(__dirname, 'src/shared/styles/include/Index')
},
{
find: '@typings',
replacement: path.resolve(__dirname, 'src/shared/types')
}
]
}
})