Skip to content

esm: use import attributes instead of import assertions

The old import assertions proposal has been renamed to "import attributes" with the following major changes:

  1. The keyword is now with instead of assert.
  2. Unknown assertions cause an error rather than being ignored.

This PR updates the documentation to encourage folks to use the new syntax, and add aliases for module customization hooks.

This change should be backported manually to 20.x the new V8 flag has not landed there.

Refs: https://github.com/v8/v8/commit/a0fd3209dda8527d7da810abe231df27fffe789e Fixes: https://github.com/nodejs/node/issues/50134

Merge request reports

Loading