@@ -204,7 +204,7 @@ regarding which files are parsed as ECMAScript modules.
204
204
` "type": "commonjs" ` , and the module contains ES module syntax.
205
205
206
206
If the ES Module being loaded meets the requirements, ` require() ` can load it and
207
- return the module namespace object. In this case it is similar to dynamic
207
+ return the [ module namespace object] [ ] . In this case it is similar to dynamic
208
208
` import() ` but is run synchronously and returns the name space object
209
209
directly.
210
210
@@ -249,7 +249,7 @@ by tools converting ES modules into CommonJS modules, following existing ecosyst
249
249
conventions. Code authored directly in CommonJS should avoid depending on it.
250
250
251
251
When an ES Module contains both named exports and a default export, the result returned by ` require() `
252
- is the module namespace object, which places the default export in the ` .default ` property, similar to
252
+ is the [ module namespace object] [ ] , which places the default export in the ` .default ` property, similar to
253
253
the results returned by ` import() ` .
254
254
To customize what should be returned by ` require(esm) ` directly, the ES Module can export the
255
255
desired value using the string name ` "module.exports" ` .
@@ -1296,6 +1296,7 @@ This section was moved to
1296
1296
[ `process.features.require_module` ] : process.md#processfeaturesrequire_module
1297
1297
[ `require.main` ] : #requiremain
1298
1298
[ exports shortcut ] : #exports-shortcut
1299
+ [ module namespace object ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import#module_namespace_object
1299
1300
[ module resolution ] : #all-together
1300
1301
[ native addons ] : addons.md
1301
1302
[ subpath exports ] : packages.md#subpath-exports
0 commit comments