React is a common use case for Babel, which is why there's a built-in transpiler option for it.
I propose we auto-load the React libraries if the react preset is enabled and no React libs have been mapped via bbh.modules.
Devs could still load their own preferred versions (or no version at all using ignores), but a recent version would be loaded for them if they didn't handle it manually.
Caveat
As there could be conflicts if someone opted to mock React in a custom local script, it's sensible to have a config option to disable auto-loading—e.g. bbh.autoloadReact = false
Proposal
React is a common use case for Babel, which is why there's a built-in transpiler option for it.
I propose we auto-load the React libraries if the
react
preset is enabled and no React libs have been mapped viabbh.modules
.Devs could still load their own preferred versions (or no version at all using
ignores
), but a recent version would be loaded for them if they didn't handle it manually.Caveat
As there could be conflicts if someone opted to mock React in a custom local script, it's sensible to have a config option to disable auto-loading—e.g.
bbh.autoloadReact = false