Rename sw files, fix sw hopefully

This commit is contained in:
Hans5958 2023-04-02 12:59:30 +07:00
parent 2588bde989
commit 4300c6a531
5 changed files with 4 additions and 11 deletions

View file

@ -20,8 +20,7 @@
}
},
"parcelIgnore": [
"pwabuilder-sw-register.js",
"pwabuilder-sw.js"
"sw.js"
],
"browserslist": [
">= 0.5%",

View file

@ -18,5 +18,4 @@ cp web/atlas.json dist/
cp web/*.txt dist/
cp web/_headers dist/
cp web/favicon.ico dist/
cp web/pwabuilder-sw-register.js dist/
cp web/pwabuilder-sw.js dist/
cp web/sw.js dist/

View file

@ -1,6 +0,0 @@
import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate'
const el = document.createElement('pwa-update')
// el.swpath = "/_js/pwabuilder-sw.js";
// console.log(el.swpath)
document.body.appendChild(el)

View file

@ -41,7 +41,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-dark-5@1.1.3/dist/css/bootstrap-dark.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css">
<link rel="manifest" href="./manifest.webmanifest">
<script type="module" src="./_js/pwabuilder-sw-register.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate/dist/pwa-update.js"></script>
<script src="./_js/favicon.js" defer></script>
<script type="application/ld+json">
{
@ -449,5 +449,6 @@ <h5 class="modal-title" id="donateModalLabel">Donation Links</h5>
<script src="./_js/main/main.js"></script>
<!-- <script src="./_js/main/stats.js"></script>
<script src="./_js/minified.js"></script> -->
<pwa-update swpath="./sw.js"></pwa-update>
</body>
</html>