diff --git a/README.md b/README.md index ff523be..fb7858c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This template requires [Docker](https://docs.docker.com/install/) for providing ## Wrangler -This template requires version >=1.6.0 of [Wrangler](https://github.com/cloudflare/wrangler) +This template requires version >=1.14.0 of [Wrangler](https://github.com/cloudflare/wrangler) ```console $ wrangler generate myapp https://github.com/cloudflare/worker-emscripten-template diff --git a/index.js b/index.js index ec38bad..44e75cd 100644 --- a/index.js +++ b/index.js @@ -11,12 +11,12 @@ addEventListener('fetch', event => { // so we can initialize the WASM instance ourselves // since Workers puts your wasm file in global scope // as a binding. In this case, this binding is called -// `wasm` as that is the name Wrangler uses +// `WASM_MODULE` as that is the name Wrangler uses // for any uploaded wasm module let emscripten_module = new Promise((resolve, reject) => { emscripten({ instantiateWasm(info, receive) { - let instance = new WebAssembly.Instance(wasm, info) + let instance = new WebAssembly.Instance(WASM_MODULE, info) receive(instance) return instance.exports },