You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Node.js, there is now experimental support for require('...') an ESM.
In Node.js, by default, requiring an ESM, the require returns the module namespace. There is a new PR, however, that will allow the ESM to indicate that the require should return the default export instead: nodejs/node#54563
In Node.js, there is now experimental support for
require('...')
an ESM.In Node.js, by default, requiring an ESM, the require returns the module namespace. There is a new PR, however, that will allow the ESM to indicate that the require should return the default export instead: nodejs/node#54563
Example:
With the PR
When
nodejs_compat_v2
mode is on, and we are callingrequire('...')
from a CommonJS module, the new export should be honored.The text was updated successfully, but these errors were encountered: