File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Open diff view settings
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -332,6 +332,12 @@ syncBuiltinESMExports();
332332fs .readFileSync === readFileSync;
333333```
334334
335+ > When importing built-in modules, all the named exports (i.e. properties of the module exports object)
336+ > are populated even if they are not individually accessed.
337+ > This can make initial imports of built-in modules slightly slower compared to loading them with
338+ > ` require() ` or ` process.getBuiltinModule() ` , where the module exports object is evaluated immediately,
339+ > but some of its properties may only be initialized when first accessed individually.
340+
335341## ` import() ` expressions
336342
337343[ Dynamic ` import() ` ] [ ] provides an asynchronous way to import modules. It is
You can’t perform that action at this time.
0 commit comments