#1: added pwa vite plugin

This commit is contained in:
Elmar Kresse
2024-04-23 15:54:34 +02:00
parent e13dad48b4
commit 24cbcf0ead
4 changed files with 4016 additions and 57 deletions

2
frontend/.gitignore vendored
View File

@@ -23,3 +23,5 @@ dist-ssr
*.sln *.sln
*.sw? *.sw?
*.iml *.iml
dev-dist

File diff suppressed because it is too large Load Diff

View File

@@ -42,6 +42,7 @@
"sass-loader": "^13.3.3", "sass-loader": "^13.3.3",
"typescript": "^5.4.3", "typescript": "^5.4.3",
"vite": "^5.2.7", "vite": "^5.2.7",
"vite-plugin-pwa": "^0.19.8",
"vitest": "^1.4.0", "vitest": "^1.4.0",
"vue-tsc": "^1.8.27" "vue-tsc": "^1.8.27"
} }

View File

@@ -17,10 +17,18 @@
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue"; import vue from "@vitejs/plugin-vue";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import { VitePWA } from 'vite-plugin-pwa'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [vue()], plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
devOptions: {
enabled: true
}
})],
resolve: { resolve: {
alias: { alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)), "@": fileURLToPath(new URL("./src", import.meta.url)),