Skip to content

Prefer "import attributes" to "import assertions" #52995

Description

@worstpractice

Affected URL(s)

https://nodejs.org/docs/latest/api/packages.html#modules-loaders

Description of the problem

The ECMAScript module loader section (bottom) states:

It can load JSON modules, but an import assertion is required.

Here, we should likely:

  1. Prefer "import attributes" to "import assertions" (which are deprecated).
  2. Consider including a relevant link to v8.dev, as either term is otherwise used in the documentation without further explanation, despite their relative obscurity and general confusability (especially to someone googling this newfangled jargon for the first time).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.loadersIssues and PRs related to ES module loaders.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions