-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
82 lines (76 loc) · 1.69 KB
/
vite.config.js
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
/* eslint-disable n/prefer-global/process */
import path from 'node:path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Pages from 'vite-plugin-pages'
import Layouts from 'vite-plugin-vue-layouts'
import AutoImport from 'unplugin-auto-import/vite'
import UnoCSS from 'unocss/vite'
import { quasar } from '@quasar/vite-plugin'
import { QuasarResolver } from 'unplugin-vue-components/resolvers'
import Components from 'unplugin-vue-components/vite'
// https://vitejs.dev/config/
export default defineConfig({
base: './',
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
build: {
outDir: './dist',
},
resolve: {
alias: {
'@/': `${path.resolve(__dirname, 'src')}/`,
},
},
server: {
https: false,
host: true,
},
plugins: [
vue(),
Pages(),
Layouts(),
UnoCSS(),
quasar({
autoImportComponentCase: 'pascal',
}),
Components({
extensions: ['vue', 'md'],
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
resolvers: [QuasarResolver()],
dts: false,
}),
AutoImport({
include: [
/\.js$/,
/\.vue$/, /\.vue\?vue/,
/\.md$/,
],
imports: [
'vue',
'vue-router',
'vue/macros',
'@vueuse/core',
{
axios: [
['default', 'axios'],
],
},
],
dirs: [
'src/composables',
'src/stores',
'src/services',
'src/directives',
],
vueTemplate: true,
dts: false,
eslintrc: {
enabled: true,
filepath: './.eslintrc-auto-import.json',
globalsPropValue: true,
},
}),
],
})