diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 12121f37..67b6cf9c 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -59,14 +59,7 @@ const asyncESM = require('internal/process/esm_loader'); let cjsParse; async function initCJSParse() { - if (typeof WebAssembly === 'undefined') { - cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse; - } else { - const { parse, init } = - require('internal/deps/cjs-module-lexer/dist/lexer'); - await init(); - cjsParse = parse; - } + cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse; } const translators = new SafeMap(); diff --git a/node.gyp b/node.gyp index 48fd7a12..580e1d8d 100644 --- a/node.gyp +++ b/node.gyp @@ -250,7 +250,6 @@ 'deps/acorn-plugins/acorn-private-methods/index.js', 'deps/acorn-plugins/acorn-static-class-features/index.js', 'deps/cjs-module-lexer/lexer.js', - 'deps/cjs-module-lexer/dist/lexer.js', ], 'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)', 'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',