-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (57 loc) · 1.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
type="image/x-icon"
href="https://moonface.digital/static/mf-ico.png"
/>
<title>Svelte App</title>
<style>
html,
body {
padding: 0;
margin: 0;
background-color: #fff;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
overflow-x: hidden;
}
</style>
</head>
<body>
<script type="module">
function changeScript() {
let ifProd = import.meta.env.PROD
let script = document.createElement('script')
script.setAttribute('type', 'module')
if (ifProd) {
script.setAttribute('src', '/dist/main.iife.js')
} else {
script.setAttribute('src', '/src/index.js')
console.warn('In Development')
}
document.body.appendChild(script)
}
changeScript()
</script>
<h2
style="
width: 30em;
right: 0;
bottom: 0;
position: absolute;
padding: 3rem;
"
>
This component is loaded from a single script!
</h2>
</body>
</html>