diff options
Diffstat (limited to 'vite.config.js')
-rw-r--r-- | vite.config.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..cee8727 --- /dev/null +++ b/vite.config.js | |||
@@ -0,0 +1,44 @@ | |||
1 | import { VitePWA } from "vite-plugin-pwa"; | ||
2 | import { fileURLToPath, URL } from "url"; | ||
3 | |||
4 | import { defineConfig } from "vite"; | ||
5 | import vue from "@vitejs/plugin-vue"; | ||
6 | |||
7 | // https://vitejs.dev/config/ | ||
8 | export default defineConfig({ | ||
9 | base: "", | ||
10 | build: { | ||
11 | assetsDir: "resources", | ||
12 | }, | ||
13 | plugins: [ | ||
14 | vue(), | ||
15 | VitePWA({ | ||
16 | registerType: "autoUpdate", | ||
17 | useCredentials: true, | ||
18 | manifestFilename: "assets/manifest.json", | ||
19 | manifest: { | ||
20 | name: "Homer dashboard", | ||
21 | short_name: "Homer", | ||
22 | description: "Home Server Dashboard", | ||
23 | theme_color: "#3367D6", | ||
24 | icons: [ | ||
25 | { | ||
26 | src: "./icons/pwa-192x192.png", | ||
27 | sizes: "192x192", | ||
28 | type: "image/png", | ||
29 | }, | ||
30 | { | ||
31 | src: "./icons/pwa-512x512.png", | ||
32 | sizes: "512x512", | ||
33 | type: "image/png", | ||
34 | }, | ||
35 | ], | ||
36 | }, | ||
37 | }), | ||
38 | ], | ||
39 | resolve: { | ||
40 | alias: { | ||
41 | "@": fileURLToPath(new URL("./src", import.meta.url)), | ||
42 | }, | ||
43 | }, | ||
44 | }); | ||