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