Skip to content

fix: cjs-module-lexer WebAssembly out of memory fallback

This implements a possible fix for the Wasm memory issues that have been coming up with hosts that are unable to run WebAssembly in v8 due to low memory requirements.

See the thread here - https://github.com/nodejs/cjs-module-lexer/issues/61, there have also been issues posted in core, some open and some closed.

I don't know why this took me so long, but we can just fallback to the JS lexer implementation if Wasm initialization fails, which this PR should provide.

//cc @nodejs/modules

Merge request reports

Loading