Thanks for the comment Brian McBride!
Integration at build-time, is, as you mentioned, bundling all components as a single project.
However, Bit is not trying to replace NPM’s package registry. It is configured to publish to bit.dev’s registry by default but you can easily change that to whatever registry you prefer.
Bit treats each component as its own repository (with its own separate source-control and release tags), but with a few critical differences:
- Bit handles the dependencies between these independent components, these “repositories”. For example, whenever a component is changed and released with a new version, Bit runs a CI on all its dependent components (as it is aware of its dependencies and dependents)
- An independent component, just like an independent project will have its source code, dependency graph, dev environment setup, etc — all source controlled.
Unlike a regular project, an independent component will also version its built artifacts. That includes its bundled component preview, docs, etc — but most importantly — its Node package.
When we ‘import’ (clone) a component into a Bit workspace, we download its source file into our working directory AND its distributable package in our node_modules directory. That allows us to collaborate on components from any project while consuming them just like any other package (the package will continuously get updated when making changes to its source file in the working directory)