-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
22 lines (22 loc) · 726 Bytes
/
index.html
File metadata and controls
22 lines (22 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/src/css/main.css" />
</head>
<body>
<div id="app"></div>
<script type="module" src="main.js"></script>
<script type="module">
if ('serviceWorker' in navigator && import.meta.env.MODE === 'production') {
window.addEventListener('load', function () {
navigator.serviceWorker
.register('/sw.js')
.then(res => console.log('Service worker registered'))
.catch(err => console.log('Service worker not registered', err));
});
}
</script>
</body>
</html>