Open ELLIOTTCABLE opened 7 years ago
Thank you for reporting!
I suspect it's a problem with load-order within babel, and one of the two systems stomping on eachother. https://github.com/istanbuljs/babel-plugin-istanbul/issues/115
That's true. Due to the plugin ordering in Babel6, and it's under discussion in Babel7 (https://github.com/babel/babel/issues/5623, https://github.com/babel/babel/issues/5854).
- Plugins run before Presets.
- Plugin ordering is first to last.
- Preset ordering is reversed (last to first).
In short, if power-assert transpiler runs before istanbul, it works.
Hmm I'll add this to known problems.
Thanks for the quick reply, @twada! Feel free to link to the issue from the README or something like that, then.
Fly safe! <3
So, I can't narrow it down to a simple test-case; but at the moment, using the
power-assert
preset (for testing output) alongside the istanbul plugin (for coverage generation) produces obscure syntax errors inside babel:(More: https://travis-ci.org/ELLIOTTCABLE/giraphe/jobs/245592548#L224-L372)
This is fixed by removing
babel-preset-power-assert
and replacing it with the individual plugins themselves, and then loading all three of them as babel plugins, instead of presets.