jamsinclair / jSquash

Browser & Web Worker focussed wasm bundles derived from the Squoosh App.
Apache License 2.0
222 stars 14 forks source link

Unhandled Rejection (ReferenceError): Cannot access 'emscriptenModule' before initialization #13

Closed Aloento closed 2 years ago

Aloento commented 2 years ago

I'm using Webpack 5 with

    memo.set('experiments', {
      asyncWebAssembly: true,
      syncWebAssembly: true,
    });

    memo.module
      .rule('wasm')
      .test(/\.wasm/)
      .type('asset/resource');
Aloento commented 2 years ago

Unhandled Rejection (TypeError): moduleFactory is not a function

jamsinclair commented 2 years ago

I'm not familiar with the webpack tools you're using. We'll need more information to be able to help 🤓

There shouldn't be much configuration required. You can see a working Webpack 5 example at https://github.com/jamsinclair/jSquash/tree/main/examples/with-webpack