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
| import vue from '@vitejs/plugin-vue';
| import vueJsx from '@vitejs/plugin-vue-jsx';
| import vueDevTools from 'vite-plugin-vue-devtools';
| import AutoImport from 'unplugin-auto-import/vite';
| import tailwindcss from '@tailwindcss/vite';
| import Components from 'unplugin-vue-components/vite';
| import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
| export default () => {
| return [
| AutoImport({
| imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
| resolvers: [ElementPlusResolver()],
| dirs: ['./src/stores/**', './src/composables/**'],
| vueTemplate: true,
| vueDirectives: {
| isDirective(normalizeImportFrom, _importEntry) {
| return normalizeImportFrom.includes('/directives/');
| },
| },
| eslintrc: {
| enabled: true, // Default `false`
| // provide path ending with `.mjs` or `.cjs` to generate the file with the respective format
| filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
| globalsPropValue: true, // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
| },
| }),
| Components({
| resolvers: [ElementPlusResolver()],
| }),
| vue(),
| vueJsx(),
| vueDevTools(),
| tailwindcss(),
| ];
| };
|
|