-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
44 lines (40 loc) · 852 Bytes
/
vite.config.js
File metadata and controls
44 lines (40 loc) · 852 Bytes
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
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { camelCase } from 'camel-case'
function Framework7Resolver(componentName) {
if (componentName.match(/^(f7-|F7)/)) {
componentName = camelCase(componentName)
return { name: componentName, from: 'framework7-vue' }
}
}
export default {
root: './source/frontend',
server: {
open: true
},
build: {
outDir: '../../build',
assetsDir: '.',
emptyOutDir: true
},
plugins: [
vue(),
AutoImport({
imports: [
'vue',
{
'framework7-vue': [
'f7',
'f7ready',
'f7route',
'f7router'
]
}
]
}),
Components({
resolvers: [Framework7Resolver],
})
]
}