Major improvements: - Replace Gorilla Mux with Chi v5 router for better performance and cleaner code - Fix CSS/JS MIME type issues that prevented proper asset loading - Add built-in CORS middleware replacing manual OPTIONS handlers - Simplify routing with nested route syntax - Update URL parameter extraction from mux.Vars to chi.URLParam New Devigo demo: - Add production Norwegian sales training website (devigo.no) - Real-world Hugo-generated content with TailwindCSS - 39 insertr-enhanced elements for comprehensive CMS testing - Demonstrates international language support and B2B use cases - Fixed asset paths for localhost serving compatibility Technical benefits: - Automatic MIME type detection for static files - Reduced code complexity with built-in middleware - Better performance with lighter dependency stack - Production-ready CORS handling
11 lines
259 B
JavaScript
11 lines
259 B
JavaScript
importScripts(
|
|
"https://storage.googleapis.com/workbox-cdn/releases/6.0.2/workbox-sw.js"
|
|
);
|
|
|
|
workbox.setConfig({ debug: false });
|
|
|
|
workbox.routing.registerRoute(
|
|
({ request }) => request.destination === "image",
|
|
new workbox.strategies.NetworkFirst()
|
|
);
|