]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - vite.config.js
Disable service worker navigation fallback (Fix #486)
[github/bastienwirtz/homer.git] / vite.config.js
CommitLineData
59994bfe 1import { VitePWA } from "vite-plugin-pwa";
cbbed634
BW
2import { fileURLToPath, URL } from "url";
3
4import { defineConfig } from "vite";
5import vue from "@vitejs/plugin-vue";
6
7// https://vitejs.dev/config/
8export default defineConfig({
eb030922 9 base: "",
b4207f27
BW
10 build: {
11 assetsDir: "resources",
12 },
13 plugins: [
59994bfe
BW
14 vue(),
15 VitePWA({
16 registerType: "autoUpdate",
b4207f27
BW
17 useCredentials: true,
18 manifestFilename: "assets/manifest.json",
19 manifest: {
59994bfe
BW
20 name: "Homer dashboard",
21 short_name: "Homer",
22 description: "Home Server Dashboard",
23 theme_color: "#3367D6",
b4207f27
BW
24 icons: [
25 {
2f1aff4d 26 src: "./icons/pwa-192x192.png",
59994bfe
BW
27 sizes: "192x192",
28 type: "image/png",
b4207f27
BW
29 },
30 {
2f1aff4d 31 src: "./icons/pwa-512x512.png",
59994bfe
BW
32 sizes: "512x512",
33 type: "image/png",
34 },
b4207f27
BW
35 ],
36 },
9371c153
BW
37 workbox: {
38 navigateFallback: null,
39 },
59994bfe 40 }),
b4207f27 41 ],
cbbed634
BW
42 resolve: {
43 alias: {
44 "@": fileURLToPath(new URL("./src", import.meta.url)),
45 },
46 },
47});