diff --git a/lib/client.js b/lib/client.js index 24472a24e2d..d4e026d4a30 100644 --- a/lib/client.js +++ b/lib/client.js @@ -24,9 +24,6 @@ const { HTTPParserError } = require('./core/errors') const buildConnector = require('./core/connect') -const llhttpWasmData = require('./llhttp/llhttp.wasm.js') -const llhttpSimdWasmData = require('./llhttp/llhttp_simd.wasm.js') - const { kUrl, kReset, @@ -413,7 +410,7 @@ const EMPTY_BUF = Buffer.alloc(0) async function lazyllhttp () { let mod try { - mod = await WebAssembly.compile(Buffer.from(llhttpWasmData, 'base64')) + mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd.wasm.js'), 'base64')) } catch (e) { /* istanbul ignore next */ @@ -421,7 +418,7 @@ async function lazyllhttp () { // being enabled, but the occurring of this other error // * https://github.com/emscripten-core/emscripten/issues/11495 // got me to remove that check to avoid breaking Node 12. - mod = await WebAssembly.compile(Buffer.from(llhttpSimdWasmData, 'base64')) + mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp.wasm.js'), 'base64')) } return await WebAssembly.instantiate(mod, {