File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,18 +175,19 @@ unspecified.
175175
176176## Packages
177177
178- ### Package Entry Points
178+ ### Package Exports
179179
180180There 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
182182capabilities 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
You can’t perform that action at this time.
0 commit comments