Skip to content

Commit

Permalink
Adds a loader for manifest loading
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis authored Oct 13, 2021
1 parent 8cd4be3 commit 0269243
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/design/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ There are currently [three loader hooks](https://github.com/nodejs/node/tree/mas

1. `resolve`: Takes a specifier (the string after `from` in an `import` statement) and converts it into an URL to be loaded.

1. `loadManifest`: Takes the resolved URL and returns the `package.json` from the location (or `null` if it doesn't exist).

1. `load`: Takes the resolved URL and returns runnable code (JavaScript, Wasm, etc.) as well as the name of one of Node’s ESM loader’s [“translators”](https://github.com/nodejs/node/blob/master/lib/internal/modules/esm/translators.js):
* `commonjs`
* `module`
Expand Down

0 comments on commit 0269243

Please sign in to comment.