added version info and reload option

This commit is contained in:
Elmar Kresse
2024-09-09 15:52:29 +02:00
parent 00009f7bfe
commit b72cdd85e1
14 changed files with 131 additions and 76 deletions

View File

@@ -33,7 +33,7 @@ export default defineConfig({
"apple-touch-icon.png",
"mask-icon.svg",
"robots.txt",
"sitemap.xml"
"sitemap.xml",
],
manifest: {
name: "HTWKalender",
@@ -87,16 +87,15 @@ export default defineConfig({
],
},
registerType: "autoUpdate",
devOptions: {
enabled: true,
/* when using generateSW the PWA plugin will switch to classic */
type: "module",
navigateFallback: "index.html",
suppressWarnings: true,
},
strategies: "injectManifest",
injectManifest: {
globPatterns: ["**/*.{js,css,html,png,svg}"],
},
}),
],
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
@@ -116,6 +115,9 @@ export default defineConfig({
},
},
},
build: {
sourcemap: true,
},
esbuild: {
supported: {
"top-level-await": true,