homer/vite.config.js

51 lines
1.1 KiB
JavaScript
Raw Normal View History

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",
start_url: "../",
scope: "../",
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
],
},
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("./node_modules", import.meta.url)),
2022-06-04 22:40:48 +02:00
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});