Skip to content

Commit 88ed6e2

Browse files
authored
update package exports section
1 parent 28e3157 commit 88ed6e2

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

doc/api/esm.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,19 @@ unspecified.
175175

176176
## Packages
177177

178-
### Package Entry Points
178+
### Package Exports
179179

180180
There are two fields that can define entry points for a package: `"main"` and
181181
`"exports"`. The `"main"` field is supported in all versions of Node.js, but its
182182
capabilities are limited: it only defines the main entry point of the package.
183-
The `"exports"` field, part of [Package Exports][], provides an alternative to
184-
`"main"` where the package main entry point can be defined while also
185-
encapsulating the package, preventing any other entry points besides those
186-
defined in `"exports"`. If package entry points are defined in both `"main"` and
187-
`"exports"`, the latter takes precedence in versions of Node.js that support
188-
`"exports"`. [Conditional Exports][] can also be used within `"exports"` to
189-
define different package entry points per environment.
183+
184+
The `"exports"` field provides an alternative to `"main"` where the package
185+
main entry point can be defined while also encapsulating the package, preventing
186+
any other entry points besides those defined in `"exports"`. If package entry
187+
points are defined in both `"main"` and `"exports"`, the latter takes precedence
188+
in versions of Node.js that support `"exports"`. [Conditional Exports][] can
189+
also be used within `"exports"` to define different package entry points per
190+
environment.
190191

191192
#### Package Exports Main
192193

0 commit comments

Comments
 (0)