Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow plugins to assert that a specific babel version has loaded the plugin. #7450
This allows plugins to use
Trying to load
where before it would throw about accessing
I at first thought maybe it would be nicer if modules that contain plugins simple export a second constant which is the version of babel-core that this plugin supports.
I don't think it is too verbose, but if so then we could maybe include the assert in the helper? In the stack the plugin would still how up if I'm not wrong.
export default declare('>=7.2.3', () => plugin);
But I also like how it is now.
@danez Yeah, I was on the fence about that approach and mostly I opted to go with this PR's approach instead because having it be a programmatic API like