Skip to content

Commit

Permalink
Merge pull request #2 from srounce/initial-commit
Browse files Browse the repository at this point in the history
`index.html` now uses `main.js` as entry-point
  • Loading branch information
kellytk authored Aug 15, 2019
2 parents fdf6d31 + a36da4e commit 640b245
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
11 changes: 2 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@
<head>
<meta charset="utf-8" />
<title>Yew</title>
<script src="/pkg/bundle.js" defer></script>
</head>

<body>
<script type="module">
import init, { run_app } from '/pkg/yew_wasm_pack_minimal.js';
async function main() {
await init('/pkg/yew_wasm_pack_minimal_bg.wasm');
run_app();
}
main()
</script>
</body>

</html>
</html>
6 changes: 6 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import init, { run_app } from './pkg/yew_wasm_pack_minimal.js';
async function main() {
await init('/pkg/yew_wasm_pack_minimal_bg.wasm');
run_app();
}
main()

0 comments on commit 640b245

Please sign in to comment.