- aggiornamento con proj RISO. postcss, pwa.

This commit is contained in:
Surya Paolo
2025-03-05 18:14:00 +01:00
parent 5aa794ef18
commit 5c38bbd52e
340 changed files with 7203259 additions and 923 deletions

View File

@@ -1,25 +1,23 @@
/* eslint-disable no-undef */
import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching';
import { precacheAndRoute } from 'workbox-precaching';
import { registerRoute } from 'workbox-routing';
import { clientsClaim, setCacheNameDetails, skipWaiting } from 'workbox-core';
import { setCacheNameDetails } from 'workbox-core';
import {
NetworkFirst,
NetworkOnly,
StaleWhileRevalidate,
CacheFirst,
} from 'workbox-strategies';
const ENABLE_DYNAMIC_CACHING = false;
import { CacheableResponsePlugin } from 'workbox-cacheable-response';
import { ExpirationPlugin } from 'workbox-expiration';
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.5.4/workbox-sw.js');
self.addEventListener('install', () => self.skipWaiting());
self.addEventListener('install', () => {
console.log('Service Worker: Skip...');
self.skipWaiting()
});
self.addEventListener('activate', (event) => {
console.log('Service Worker: Activated');
// console.log('CLAIM');
//event.waitUntil(self.clients.claim())
@@ -39,7 +37,12 @@ const VITE_APP_VERSION = "1.1.23";
console.log(' [ VER-' + VITE_APP_VERSION + ' ] _---------________------ PAO: this is my custom service worker');
importScripts('js/idb.js', 'js/storage.js');
try {
importScripts('/js/idb.js', '/js/storage.js');
console.log('Local scripts imported successfully.');
} catch (error) {
console.error('Failed to import local scripts:', error);
}
let port = self.location.hostname.startsWith('test') ? 3001 : 3000;
let ISTEST = self.location.hostname.startsWith('test');