Part of a Component's release process includes generating a standard node package. This ensures components are consumable in any project (Bit or non-Bit).
To preserve this universality while enabling Bit to recognize a package as a component (and treat it accordingly), a componentId
property is added to the Component's package.json
.
{ "name": "@company/scope.ui.card", "main": "dist/index.js", "componentId": { "scope": "company.scope", "name": "ui/card" } }
The package.json
file is auto-generated by Bit, and can be customized using the PKG aspect config or API.
Packages are included in the component versions. Components exported to Bit Cloud will have their packages available for installation. An additional commonJS package registry (like npm's registry) can be used to publish your component packages, as well.