How to expose additional exports of a package
Status
Accepted.
Context
There are multiple ways of exposing additional exports of a package. They can either be exposed in the main file or configured as additional export nodes via rollup and the package.json.
Decision
All exports should be exposed through the main file of the package as additional named exports.
Consequences
- (+) A package consumer does not need to know additional paths to import.
- (+) This pattern is established by most major frameworks.
- (-) This restriction must be manually enforced.