-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
37 lines (37 loc) · 1.39 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Loading ...</title>
<script>
if (typeof process === "undefined") { // running in the browser, not Electron!
window.process = { env: { HOT: true } };
console.log("Running in development mode, in-browser");
function require(n) {
function stub() {
console.log("Called function `" + arguments.callee.name + ' ` with data: ', arguments);
return "";
}
console.log("Required `" + n + "`");
if (n === 'querystring') {
return { parse: stub }
}
if (n === 'electron') {
return { ipcRenderer: { send: stub, on: stub } }
}
}
}
</script>
</head>
<body>
<div id="root"></div>
<div id="full"></div>
<script>
(function() {
const script = document.createElement('script');
script.src = (process.env.HOT) ? 'http://localhost:3000/dist/bundle.js' : 'bundle.js';
document.write(script.outerHTML);
}());
</script>
</body>
</html>