mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Add basic passthrough ServiceWorker and robots.txt
This commit is contained in:
3 files changed
+32
No files matched your search
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user