-
Notifications
You must be signed in to change notification settings - Fork 31
/
vite.config.js
42 lines (41 loc) · 1.07 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
import { resolve } from "path";
import { defineConfig } from "vite";
import { fileURLToPath, URL } from "node:url";
import vue from "@vitejs/plugin-vue";
import vuetify from "vite-plugin-vuetify";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
vuetify({
autoImport: true,
styles: { configFile: "./powa/static/styles/variables.scss" },
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./powa/static/js", import.meta.url)),
},
},
build: {
manifest: true,
outDir: resolve(__dirname, "powa/static/dist"),
emptyOutDir: true,
rollupOptions: {
input: "/powa/static/js/main.js",
output: {
manualChunks: {
// Split external library from transpiled code.
d3: ["d3"],
lodash: ["lodash"],
vue: ["vue", "vue-router"],
vuetify: ["vuetify", "@mdi/js"],
luxon: ["luxon"],
highlight: ["highlight.js"],
moment: ["moment"],
"sqltools-formatter": ["@sqltools/formatter"],
},
},
},
},
});