fix(service-worker): enhance unregister logic and update index.html
- Updated the index.html to load the env-config.js script as a module for better compatibility. - Improved the unregister logic in both the unregister-sw.js and login-page.tsx to specifically target the ngsw-worker, ensuring it is unregistered correctly and the page reloads afterward. This prevents multiple unregister attempts and enhances user experience.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
/>
|
||||
<title>Worklenz</title>
|
||||
<!-- Environment configuration -->
|
||||
<script src="/env-config.js"></script>
|
||||
<script type="module" src="/env-config.js"></script>
|
||||
<!-- Unregister service worker -->
|
||||
<script src="/unregister-sw.js"></script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user