]> git.immae.eu Git - github/bastienwirtz/homer.git/blame - vite.config.js
new PWA implementation
[github/bastienwirtz/homer.git] / vite.config.js
CommitLineData
b4207f27 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({
b4207f27
BW
9 build: {
10 assetsDir: "resources",
11 },
12 plugins: [
13 vue(),
14 VitePWA({
15 registerType: 'autoUpdate',
16 useCredentials: true,
17 manifestFilename: "assets/manifest.json",
18 manifest: {
19 name: 'Homer dashboard',
20 short_name: 'Homer',
21 description: 'Home Server Dashboard',
22 theme_color: '#3367D6',
23 icons: [
24 {
25 src: 'pwa-192x192.png',
26 sizes: '192x192',
27 type: 'image/png'
28 },
29 {
30 src: 'pwa-512x512.png',
31 sizes: '512x512',
32 type: 'image/png'
33 }
34 ],
35 },
36 })
37 ],
cbbed634
BW
38 resolve: {
39 alias: {
40 "@": fileURLToPath(new URL("./src", import.meta.url)),
41 },
42 },
43});
44