-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvite.config.js
32 lines (31 loc) · 1.11 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
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 IconsResolve from "unplugin-icons/resolver";
import { BootstrapVueNextResolver } from "unplugin-vue-components/resolvers";
// https://vitejs.dev/config/
export default defineConfig({
// In production the `base` has to be an absolute URL of the GitHub page, where we're deploying to
// otherwise it will throw a 404 and the app won't start.
// The BASE_URL should be set on the CI (see .github/workflows/main.yml)
base: process.env.BASE_URL ? process.env.BASE_URL : "/",
plugins: [
vue(),
Components({
resolvers: [BootstrapVueNextResolver(), IconsResolve()],
}),
Icons({
compiler: "vue3",
autoInstall: true,
}),
legacy({
targets: ["ie >= 11"],
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
}),
],
chokidarWatchOptions: {
usePolling: true,
},
});