fix: rotate PWA cache and restrict runtime caching

This commit is contained in:
2026-08-03 00:38:32 +05:30
parent 868c768805
commit 13aa75c366
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -135,6 +135,8 @@ test("site includes core guides and production configuration", () => {
expect(config).toContain(
'"style-src": ["\'self\'", "\'unsafe-inline\'", "https://fonts.googleapis.com"]',
);
expect(config).toContain('cacheName: "wrnexus-pwa-v2"');
expect(config).toContain('pattern: "^https://wrnexusjs\\\\.dev/"');
});
test("language reference covers directives, events, loops, and conditionals", () => {
+8
View File
@@ -15,6 +15,14 @@ const config: AppConfig = {
pwa: {
name: "WRNexusJS Documentation",
shortName: "WRNexusJS Docs",
cacheName: "wrnexus-pwa-v2",
runtimeCaching: [
{
pattern: "^https://wrnexusjs\\.dev/",
strategy: "network-first",
methods: ["GET"],
},
],
display: "standalone",
themeColor: "#6366f1",
backgroundColor: "#0f172a",