ceiba-scores/vite.config.js

61 lines
1.4 KiB
JavaScript
Raw Normal View History

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(),
2024-04-30 00:15:32 +02:00
VitePWA({
2024-04-29 23:56:00 +02:00
name: "My First Progressive Web app",
short_name: "First PWA",
theme_color: "#eb5252",
background_color: "#000000",
2024-04-30 00:15:32 +02:00
registerType: "autoUpdate",
injectRegister: "auto",
// add this to cache all the imports
workbox: {
globPatterns: ["**/*"],
},
// add this to cache all the
// static assets in the public folder
includeAssets: [
"**/*",
],
useCredentials: true,
2024-04-29 23:56:00 +02:00
manifest: {
theme_color: "#eb5252",
orientation: "portrait",
display: "fullscreen",
2024-04-30 00:15:32 +02:00
scope: "/",
2024-04-29 23:56:00 +02:00
icons: [
{
2024-04-30 00:15:32 +02:00
"src": "/images/pwa-icon-256.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/images/pwa-icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
},
],
2024-04-29 23:56:00 +02:00
},
devOptions: {
2024-04-30 00:15:32 +02:00
enabled: true,
},
2024-04-29 23:56:00 +02:00
}),
],
2022-03-29 23:30:23 +02:00
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
});