Open szanuje opened 2 months ago
@szanuje Which version of webpack are you using? We've had a few issues with correctly handling webpack that might be related:
'brotli-wasm' requires the wasm binary in a way that is very unfriendly to web bundlers.
const path = require('path').join(__dirname, 'brotli_wasm_bg.wasm');
const bytes = require('fs').readFileSync(path);
The dynamic fs read prevents the bundler from bundling the wasm, although we implemented a custom wasm loader. The root cause seems to be this https://github.com/rustwasm/wasm-pack/issues/831
Thanks for reporting an issue!
Steps to reproduce
Add package to NextJS 14 project
Expected behaviour
Package imported correctly
Actual behaviour
Package is throwing error on NextJS build
Any logs, error output, etc?
Error is either:
or
depending on which import statement I use:
Any other comments?
...