2022-03-29 23:30:23 +02:00
|
|
|
import { fileURLToPath, URL } from "url";
|
2024-04-29 23:56:00 +02:00
|
|
|
import { VitePWA } from "vite-plugin-pwa";
|
2022-03-29 23:30:23 +02:00
|
|
|
|
|
|
|
import { defineConfig } from "vite";
|
|
|
|
import vue from "@vitejs/plugin-vue";
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2024-04-29 23:56:00 +02:00
|
|
|
// publicDir: 'public',
|
|
|
|
// includeAssets: ['public/answers/*.web'],
|
|
|
|
plugins: [
|
|
|
|
vue(),
|
|
|
|
VitePWA({
|
|
|
|
name: "My First Progressive Web app",
|
|
|
|
short_name: "First PWA",
|
|
|
|
theme_color: "#eb5252",
|
|
|
|
background_color: "#000000",
|
|
|
|
registerType: 'autoUpdate',
|
|
|
|
injectRegister: 'auto',
|
|
|
|
// workbox: {
|
|
|
|
// globPatterns: ['**/*.{js,css,html,ico,png,svg,webp}']
|
|
|
|
// },
|
|
|
|
includeAssets: ['favicon.ico', '/favicon/android-icon-*.png', 'mask-icon.svg'],
|
|
|
|
manifest: {
|
|
|
|
theme_color: "#eb5252",
|
|
|
|
orientation: "portrait",
|
|
|
|
display: "fullscreen",
|
|
|
|
Scope: "/",
|
|
|
|
icons: [
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-36x36.png",
|
|
|
|
sizes: "36x36",
|
|
|
|
type: "image/png",
|
|
|
|
density: "0.75"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-48x48.png",
|
|
|
|
sizes: "48x48",
|
|
|
|
type: "image/png",
|
|
|
|
density: "1.0"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-72x72.png",
|
|
|
|
sizes: "72x72",
|
|
|
|
type: "image/png",
|
|
|
|
density: "1.5"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-96x96.png",
|
|
|
|
sizes: "96x96",
|
|
|
|
type: "image/png",
|
|
|
|
density: "2.0"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-144x144.png",
|
|
|
|
sizes: "144x144",
|
|
|
|
type: "image/png",
|
|
|
|
density: "3.0"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
src: "/favicon/android-icon-192x192.png",
|
|
|
|
sizes: "192x192",
|
|
|
|
type: "image/png",
|
|
|
|
density: "4.0"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
devOptions: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
],
|
2022-03-29 23:30:23 +02:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|