Well, what I found that worked for me is to handle a build env just like any other component… Basically, import it and export your own version, just like you can modify a component and export it to another scope.
This was my flow:
- Create a new directory and an empty workspace in it
- Import the environment you want to modify (but without the --compiler/tester flag)
- Open and modify the
.babelrc file of the component
- Tag and export the new version of the component to your own scope
Now you have your own compiler with a modified set of plugins.
The next step is to head back to your project, and modify the
bit.json file to point to the new compiler, run
bit status to see that all components are now
modified (due to the modified compiler). Tag and export a new version, with the new compiler.
Hope this helps!