@@ -331,15 +331,17 @@ described in greater detail elsewhere in this documentation.
331
331
The core modules are defined within the Node.js source and are located in the
332
332
` lib/ ` folder.
333
333
334
- Core modules are always preferentially loaded if their identifier is
335
- passed to ` require() ` . For instance, ` require('http') ` will always
336
- return the built in HTTP module, even if there is a file by that name.
337
-
338
- Core modules can also be identified using the ` node: ` prefix, in which case
334
+ Core modules can be identified using the ` node: ` prefix, in which case
339
335
it bypasses the ` require ` cache. For instance, ` require('node:http') ` will
340
336
always return the built in HTTP module, even if there is ` require.cache ` entry
341
337
by that name.
342
338
339
+ Some core modules are always preferentially loaded if their identifier is
340
+ passed to ` require() ` . For instance, ` require('http') ` will always
341
+ return the built-in HTTP module, even if there is a file by that name. The list
342
+ of core modules that can be loaded without using the ` node: ` prefix is exposed
343
+ as [ ` module.builtinModules ` ] [ ] .
344
+
343
345
## Cycles
344
346
345
347
<!-- type=misc-->
@@ -1088,6 +1090,7 @@ This section was moved to
1088
1090
[ `__dirname` ] : #__dirname
1089
1091
[ `__filename` ] : #__filename
1090
1092
[ `import()` ] : https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports
1093
+ [ `module.builtinModules` ] : module.md#modulebuiltinmodules
1091
1094
[ `module.children` ] : #modulechildren
1092
1095
[ `module.id` ] : #moduleid
1093
1096
[ `module` core module ] : module.md
0 commit comments