package entry point
A path consumers can import from a package, such as @company/design or @company/design/button, each mapped to its own files.
In more detail
Separate entry points let an app import one primitive without pulling in unrelated code. They are declared as subpaths in the exports field.
Related terms
- exports field — The package.json field that lists exactly which files a package exposes, by path such as "." or "./button", and which file to use in each situation.
- tree shaking — Removing code that is exported but never imported from the final bundle, so less code is shipped.
- scoped package — An npm package whose name starts with an organisation scope, such as @ds/core or @company/design.
Taught in
- Component Packaging: Dual ESM/CJS Builds & Package Exports — Design Systems & Component Engineering