Avoid inline script in index.html

This helps Parcel generate a proper standalone JS bundle.
This commit is contained in:
Simon Ser 2021-11-17 10:58:02 +01:00
parent 3f2553291f
commit c4c0a77162
2 changed files with 5 additions and 6 deletions

View file

@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>gamja IRC client</title>
<link rel="stylesheet" href="./style.css">
<script type="module" src="./main.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="manifest" href="manifest.json">
</head>
@ -11,11 +12,5 @@
<noscript>
<p>Unfortunately gamja requires JavaScript. Please enable it!</p>
</noscript>
<script type="module">
import { html, render } from "./lib/index.js";
import App from "./components/app.js";
render(html`<${App}/>`, document.body);
</script>
</body>
</html>

4
main.js Normal file
View file

@ -0,0 +1,4 @@
import { html, render } from "./lib/index.js";
import App from "./components/app.js";
render(html`<${App}/>`, document.body);