Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated import paths for WASM files #286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/game-of-life/implementing.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ At the top of `wasm-game-of-life/www/index.js`, let's fix our import to bring in
the `Universe` rather than the old `greet` function:

```js
import { Universe } from "wasm-game-of-life";
import { Universe } from "../pkg/wasm_game_of_life";
```

Also, let's get that `<pre>` element we just added and instantiate a new
Expand Down Expand Up @@ -515,7 +515,7 @@ tick.

```js
// Import the WebAssembly memory at the top of the file.
import { memory } from "wasm-game-of-life/wasm_game_of_life_bg";
import { memory } from "../pkg/wasm_game_of_life_bg";

// ...

Expand Down Expand Up @@ -582,6 +582,12 @@ from within the `wasm-game-of-life/www` directory:
npm run start
```

(Additionally, newer versions of Node and npm may require you to set the *node_options* environment variable to get the server to run properly, with the following command:)

```
export NODE_OPTIONS=--openssl-legacy-provider
```

If you refresh [http://localhost:8080/](http://localhost:8080/), you should be
greeted with an exciting display of life!

Expand Down