2022-07-03 21:59:57 +02:00
|
|
|
import { VitePWA } from "vite-plugin-pwa";
|
2022-06-04 22:40:48 +02:00
|
|
|
import { fileURLToPath, URL } from "url";
|
|
|
|
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import vue from "@vitejs/plugin-vue";
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-07-12 14:07:10 +02:00
|
|
|
base: "",
|
2022-07-03 21:40:47 +02:00
|
|
|
build: {
|
|
|
|
assetsDir: "resources",
|
|
|
|
},
|
|
|
|
plugins: [
|
2022-07-03 21:59:57 +02:00
|
|
|
vue(),
|
|
|
|
VitePWA({
|
|
|
|
registerType: "autoUpdate",
|
2022-07-03 21:40:47 +02:00
|
|
|
useCredentials: true,
|
|
|
|
manifestFilename: "assets/manifest.json",
|
|
|
|
manifest: {
|
2022-07-03 21:59:57 +02:00
|
|
|
name: "Homer dashboard",
|
|
|
|
short_name: "Homer",
|
|
|
|
description: "Home Server Dashboard",
|
|
|
|
theme_color: "#3367D6",
|
2022-07-03 21:40:47 +02:00
|
|
|
icons: [
|
|
|
|
{
|
2022-07-04 22:17:41 +02:00
|
|
|
src: "./icons/pwa-192x192.png",
|
2022-07-03 21:59:57 +02:00
|
|
|
sizes: "192x192",
|
|
|
|
type: "image/png",
|
2022-07-03 21:40:47 +02:00
|
|
|
},
|
|
|
|
{
|
2022-07-04 22:17:41 +02:00
|
|
|
src: "./icons/pwa-512x512.png",
|
2022-07-03 21:59:57 +02:00
|
|
|
sizes: "512x512",
|
|
|
|
type: "image/png",
|
|
|
|
},
|
2022-07-03 21:40:47 +02:00
|
|
|
],
|
|
|
|
},
|
2022-07-21 22:08:50 +02:00
|
|
|
workbox: {
|
|
|
|
navigateFallback: null,
|
|
|
|
},
|
2022-07-03 21:59:57 +02:00
|
|
|
}),
|
2022-07-03 21:40:47 +02:00
|
|
|
],
|
2022-06-04 22:40:48 +02:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|