forked from phobal/ivideo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.html
39 lines (38 loc) · 1.03 KB
/
app.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello Electron React!</title>
<script>
(function () {
const font = (process.env.HOT ? '../' : './') +
'node_modules/font-awesome/css/font-awesome.min.css';
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = font;
document.write(link.outerHTML);
}());
</script>
<script>
(function() {
if (!process.env.HOT) {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = './style.css';
document.write(link.outerHTML);
}
}());
</script>
</head>
<body>
<div id="root"></div>
<script>
{
const script = document.createElement('script');
const port = process.env.PORT || 3000;
script.src = (process.env.HOT) ? `http://localhost:${port}/static/bundle.js` : './bundle.js';
document.write(script.outerHTML);
}
</script>
</body>
</html>