mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-30 11:46:36 +08:00
fix media playback and library workflows
This commit is contained in:
@@ -7,6 +7,12 @@ import App from './App'
|
||||
import { GlobalEvents } from './components/GlobalEvents'
|
||||
import './index.css'
|
||||
|
||||
if ('serviceWorker' in navigator && import.meta.env.PROD) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/artwork-cache-sw.js').catch(() => undefined)
|
||||
})
|
||||
}
|
||||
|
||||
// Application root: BrowserRouter + global toast container.
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
|
||||
Reference in New Issue
Block a user