-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
26 lines (26 loc) · 841 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="assets/material-icons.css" rel="stylesheet">
<link href="index.css" rel="stylesheet">
<title>Tau</title>
</head>
<body>
<div id="app"></div>
<script>
const { remote } = require("electron");
let bundlePath = './bundle/renderer.bundle.js';
if (remote.process.env.NODE_ENV === 'DEV') {
const port = process.env.PORT || 8080;
bundlePath = `http://localhost:${port}/bundle/renderer.bundle.js`;
const bundleScriptEl = document.createElement('script');
bundleScriptEl.src = bundlePath;
bundleScriptEl.async = true;
document.currentScript.parentNode.insertBefore(bundleScriptEl, document.currentScript);
} else {
require(bundlePath);
}
</script>
</body>
</html>