diff options
author | Guy Bedford <guybedford@gmail.com> | 2017-11-22 12:01:11 +0200 |
---|---|---|
committer | Guy Bedford <guybedford@gmail.com> | 2017-11-28 11:47:30 +0200 |
commit | 1f5ee33dcb74202a0f29ed1ee2e941b36138f9b0 (patch) | |
tree | 5198e0a57761391a9687098ce88deaab7d47f5bf /lib/module.js | |
parent | c2d738db8053a0e090aabbeeb088b34c3da7b7ad (diff) | |
download | node-new-1f5ee33dcb74202a0f29ed1ee2e941b36138f9b0.tar.gz |
module: fix for #17130 shared loader cjs dep
PR-URL: https://github.com/nodejs/node/pull/17131
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Diffstat (limited to 'lib/module.js')
-rw-r--r-- | lib/module.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/module.js b/lib/module.js index a2d772a381..b22ba4fe66 100644 --- a/lib/module.js +++ b/lib/module.js @@ -39,6 +39,9 @@ const experimentalModules = !!process.binding('config').experimentalModules; const errors = require('internal/errors'); +module.exports = Module; + +// these are below module.exports for the circular reference const Loader = require('internal/loader/Loader'); const ModuleJob = require('internal/loader/ModuleJob'); const { createDynamicModule } = require('internal/loader/ModuleWrap'); @@ -72,7 +75,6 @@ function Module(id, parent) { this.loaded = false; this.children = []; } -module.exports = Module; const builtinModules = Object.keys(NativeModule._source) .filter(NativeModule.nonInternalExists); |