-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.mjs
45 lines (43 loc) · 1.06 KB
/
vite.config.mjs
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
import path from 'path';
import { defineConfig } from 'vite';
import Vue from '@vitejs/plugin-vue';
import Legacy from '@vitejs/plugin-legacy';
import Components from 'unplugin-vue-components/vite';
import Icons from 'unplugin-icons/vite';
import IconsResolver from 'unplugin-icons/resolver';
import Overview from './src/data/overview.mjs';
import States from './src/data/states.mjs';
import Categories from './src/data/categories.mjs';
import RankingMap from './src/data/map.mjs';
export default defineConfig({
resolve: {
alias: {
'~/': `${path.resolve(__dirname, 'src')}/`,
},
},
plugins: [
Vue({
include: [/\.vue$/, /\.md$/],
}),
Legacy({ targets: ['defaults', 'IE 11'] }),
Components({
extensions: ['vue', 'js'],
resolvers: [IconsResolver()],
}),
Icons({
compiler: 'vue3',
}),
Overview(),
States(),
Categories(),
RankingMap(),
],
ssgOptions: {
script: 'async',
formatting: 'minify',
entry: './src/main.mjs',
},
optimizeDeps: {
include: ['vue', 'vue-router'],
},
});