34 lines
983 B
HTML
34 lines
983 B
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Hello Electron React!</title>
|
|
<link rel="stylesheet" href="./css/photon.min.css" />
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script>
|
|
{
|
|
// Dynamically include DLL if in development
|
|
if (process.env.NODE_ENV === 'development') {
|
|
const dllScript = document.createElement('script');
|
|
dllScript.src = '../dll/vendor.dll.js';
|
|
document.body.appendChild(dllScript);
|
|
}
|
|
|
|
// Dynamically insert the renderer process
|
|
const script = document.createElement('script');
|
|
const port = process.env.PORT || 1212;
|
|
|
|
script.src = (process.env.HOT)
|
|
? 'http://localhost:' + port + '/dist/bundle.js'
|
|
: './dist/bundle.js';
|
|
|
|
// @HACK: Writing the script path should be done
|
|
// with HtmlWebpackPlugin
|
|
document.body.appendChild(script);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|