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