Skip to content

Commit

Permalink
feat(loader): add a generic loader
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterycommand committed May 5, 2019
1 parent d8d0bab commit cad7343
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,4 @@ typings/
# next.js build output
.next

src/loader.js

.vscode
4 changes: 4 additions & 0 deletions src/loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = function loadWasmBundle(bundle) {
const init = require(bundle.replace('_bg.wasm', '.js'));
return init(bundle).then(wasm => wasm);
};

0 comments on commit cad7343

Please sign in to comment.