Dev environments in Bit provide a controlled and consistent way to develop and build your components. They streamline your workflow and ensure that every component type is built using the same tools and configurations.
To set a component to use Bit's React environment, run:
This command tells Bit to use the React environment for the ui/button component. Now, any development or build processes for this component will leverage the tools and settings defined within the React environment.
When creating components, environments are defined the template used. You can override the default env set by the component template upon component creation use the --env
option. For example:
To check which environments your components are currently using, run:
To set the component to use a specific version of the development environment, run:
You can replace the use of a specific dev environment in another. This is useful when migrating from using the Bit official React env to your own custom env: