fix: pwa tries to include build-only files

This commit is contained in:
2023-12-21 20:05:32 +01:00
parent c1b1544256
commit b4e4ca84a4
3 changed files with 12 additions and 11 deletions

18
package-lock.json generated
View File

@@ -57,7 +57,7 @@
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-plugin-mkcert": "^1.16.0",
"vite-plugin-pwa": "^0.16.5",
"vite-plugin-pwa": "^0.17.4",
"vitest": "^0.34.4"
}
},
@@ -5467,9 +5467,9 @@
"dev": true
},
"node_modules/fast-glob": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
"integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
@@ -10927,13 +10927,13 @@
}
},
"node_modules/vite-plugin-pwa": {
"version": "0.16.5",
"resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.16.5.tgz",
"integrity": "sha512-Ahol4dwhMP2UHPQXkllSlXbihOaDFnvBIDPmAxoSZ1EObBUJGP4CMRyCyAVkIHjd6/H+//vH0DM2ON+XxHr81g==",
"version": "0.17.4",
"resolved": "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.17.4.tgz",
"integrity": "sha512-j9iiyinFOYyof4Zk3Q+DtmYyDVBDAi6PuMGNGq6uGI0pw7E+LNm9e+nQ2ep9obMP/kjdWwzilqUrlfVRj9OobA==",
"dev": true,
"dependencies": {
"debug": "^4.3.4",
"fast-glob": "^3.3.1",
"fast-glob": "^3.3.2",
"pretty-bytes": "^6.1.1",
"workbox-build": "^7.0.0",
"workbox-window": "^7.0.0"
@@ -10945,7 +10945,7 @@
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"vite": "^3.1.0 || ^4.0.0",
"vite": "^3.1.0 || ^4.0.0 || ^5.0.0",
"workbox-build": "^7.0.0",
"workbox-window": "^7.0.0"
}

View File

@@ -77,7 +77,7 @@
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vite-plugin-mkcert": "^1.16.0",
"vite-plugin-pwa": "^0.16.5",
"vite-plugin-pwa": "^0.17.4",
"vitest": "^0.34.4"
},
"type": "module"

View File

@@ -42,7 +42,8 @@ export default defineConfig({
base: "/",
includeAssets: ["favicon.png"],
workbox: {
globPatterns: ["**/*.{js,css,html,woff2,json,csv,png,svg}"],
// https://vite-pwa-org.netlify.app/frameworks/sveltekit.html#globpatterns
globPatterns: ["client/**/*.{js,css,woff2,json,csv,png,svg}", "prerendered/**/*.html"],
},
manifest: {
name: "CharaChorder Device Manager",