Skip to content

Commit

Permalink
Corrigir SW no Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
dgadelha committed May 2, 2024
1 parent d6fcc65 commit d7da099
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/ide/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@ if (environment.production) {

platformBrowserDynamic()
.bootstrapModule(AppModule)
.then(() => {
/** @see https://stackoverflow.com/a/51059335 */
if ("serviceWorker" in navigator && environment.production) {
navigator.serviceWorker.register("/ngsw-worker.js");
}
})
.catch(error => console.error(error));

0 comments on commit d7da099

Please sign in to comment.