Skip to content

Instantly share code, notes, and snippets.

@qwertie
Last active June 30, 2018 05:55
Show Gist options
  • Select an option

  • Save qwertie/fdb30b5ff266af99bce94f280c1d4bfe to your computer and use it in GitHub Desktop.

Select an option

Save qwertie/fdb30b5ff266af99bce94f280c1d4bfe to your computer and use it in GitHub Desktop.
index.html for using compiled TypeScript without additional tools
<!DOCTYPE html>
<html>
<head>
<title>App</title>
<meta charset="utf-8"/>
<script src="node_modules/react/umd/react.development.js"></script>
<script src="node_modules/react-dom/umd/react-dom.development.js"></script>
<script src="node_modules/preact/dist/preact.dev.js"></script>
<script>
module = {exports:{}}; exports = {};
window.require = function(name) { return window[name]; };
window['react'] = window.React;
window['react-dom'] = window.ReactDOM;
</script>
</head>
<body>
<h1>Mini React app ❤</h1>
<div id="app"></div>
<script src="app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment