Skip to content

Commit

Permalink
Update doc/api/packages.md
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
benmccann and aduh95 authored Jan 28, 2022
1 parent fd21495 commit 1f964a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,8 @@ is a path.
When a package has an [`"exports"`][] field, this will take precedence over the
`"main"` field when importing the package by name.

When the value is a directory, [it may only be loaded via
`require()`](modules.md#folders-as-modules).
It also defines the script that is used when the [package directory
is loaded via `require()`](modules.md#folders-as-modules).

```cjs
require('./path/to/directory'); // This resolves to ./path/to/directory/main.js.
Expand Down

0 comments on commit 1f964a5

Please sign in to comment.