Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

"only" Babel config option prevents proper evaluation of preflight checks #98

Closed
AMcBain opened this issue Nov 4, 2016 · 1 comment
Closed

Comments

@AMcBain
Copy link

AMcBain commented Nov 4, 2016

I tried to use the { "only": "*.jsx" } option with Babel through this plugin. The result of this is that the inline check test doesn't get transformed in any way because (presumably) Babel decided that the string input has no source file and can't pass an extension test. I did do some quick logging to determine that no transformation was going on in order to fail all the check tests. (none returned a hit)

I can think of two ways to deal with this, one is to add a prelight check for the presence of only and complain. The other is to delete any "only" property on the cloned options object. The latter would allow people to still use the options property if they chose without (in theory) affecting how this plugin operates. I also tested that option and didn't seem to see any issues compiling my test project.

@Rich-Harris
Copy link
Contributor

Released 2.7.0 with the fix – thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants