Skip to content

Commit

Permalink
fix: wasm now uses the two file (js, wasm) approach - significantly r…
Browse files Browse the repository at this point in the history
…educes js chunk size
  • Loading branch information
jcw780 committed Dec 23, 2020
1 parent a8d8552 commit 465b22a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 80 deletions.
Binary file added public/shellWasm.wasm
Binary file not shown.
4 changes: 3 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ class App extends React.Component<{},{}> {

//Compile Wasm
compile = () : void => {
return ShellWasm().then((M) => {
return ShellWasm({
locateFile: (path : string, ) => `${process.env.PUBLIC_URL}/${path}`,
}).then((M) => {
this.module = M;
this.calculator = new M.shellCalc();
this.parameters.shell = new M.shellParams();
Expand Down
150 changes: 71 additions & 79 deletions src/wasm/shellWasm.js

Large diffs are not rendered by default.

0 comments on commit 465b22a

Please sign in to comment.