diff options
author | Guy Bedford <guybedford@gmail.com> | 2019-10-04 13:37:27 -0400 |
---|---|---|
committer | Guy Bedford <guybedford@gmail.com> | 2019-10-06 13:30:11 -0400 |
commit | ffd22e81983056d09c064c59343a0e488236272d (patch) | |
tree | bf6df052e03191935ed7032f6d2c86e18cd886b3 /lib/internal/modules/esm/loader.js | |
parent | 0521a98fd6dfbd31994709f0f417c470f98d2b71 (diff) | |
download | android-node-v8-ffd22e81983056d09c064c59343a0e488236272d.tar.gz android-node-v8-ffd22e81983056d09c064c59343a0e488236272d.tar.bz2 android-node-v8-ffd22e81983056d09c064c59343a0e488236272d.zip |
module: use v8 synthetic modules
PR-URL: https://github.com/nodejs/node/pull/29846
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'lib/internal/modules/esm/loader.js')
-rw-r--r-- | lib/internal/modules/esm/loader.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 9800e8a550..138cf8b5ec 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -117,12 +117,7 @@ class Loader { source, url = pathToFileURL(`${process.cwd()}/[eval${++this.evalIndex}]`).href ) { - const evalInstance = async (url) => { - return { - module: new ModuleWrap(source, url), - reflect: undefined - }; - }; + const evalInstance = (url) => new ModuleWrap(source, url); const job = new ModuleJob(this, url, evalInstance, false); this.moduleMap.set(url, job); const { module, result } = await job.run(); @@ -165,7 +160,7 @@ class Loader { return createDynamicModule([], exports, url, (reflect) => { debug(`Loading dynamic ${url}`); execute(reflect.exports); - }); + }).module; }; } else { if (!translators.has(format)) |