Add basic passthrough ServiceWorker and robots.txt

This commit is contained in:
Alex Gleason committed 2025-10-11 17:14:41 -05:00
1 parent b7b34d7b43
commit c6baf5d3f9
3 files changed
+32

No files matched your search

+14
View File
@@ -13,3 +13,17 @@ import './index.css';
import '@fontsource-variable/inter';
createRoot(document.getElementById("root")!).render(<App />);
// Register service worker
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker
.register('/sw.js')
.then((registration) => {
console.log('[ServiceWorker] Registered:', registration);
})
.catch((error) => {
console.error('[ServiceWorker] Registration failed:', error);
});
});
}