Skip to content

Instantly share code, notes, and snippets.

@lion19
Created April 14, 2017 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lion19/c383fcb313540cf6b81014932b24c8e9 to your computer and use it in GitHub Desktop.
Save lion19/c383fcb313540cf6b81014932b24c8e9 to your computer and use it in GitHub Desktop.
custom webapp.html for a web build
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Razor</title>
<script>
(function() {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = './style.css';
// HACK: Writing the script path should be done with webpack
document.getElementsByTagName('head')[0].appendChild(link);
}());
</script>
</head>
<body>
<div id="root"></div>
<script>
{
const script = document.createElement('script');
const port = 8080;
script.src = './bundle.js';
// HACK: Writing the script path should be done with webpack
document.body.appendChild(script);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment