-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathvite.config.ts
31 lines (30 loc) · 861 Bytes
/
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
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';
import viteESLint from 'vite-plugin-eslint';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const path = require('path');
function resolve(dir: string) {
return path.join(__dirname, dir);
}
// https://vitejs.dev/config/
// https://github.com/vitejs/vite/issues/1930 .env
export default defineConfig({
plugins: [
vue(),
viteESLint(),
Components({
resolvers: [VantResolver()]
})
],
resolve: {
alias: {
'@': resolve('./src'),
'@common': resolve('./src/common'),
'@components': resolve('./src/components'),
'@store': resolve('./src/store'),
'@views': resolve('./src/views')
}
}
});