If it is, how is it possible to choose a babel plugin which can compile the code of my meteor package?
The thought came out of the idea of rewriting the package
meteor-coverage to use the babel plugin
istanbul to record the code-coverage. This would render quite some complex, hacky code superfluous and would allow us to be able to cover dynamically imported files (https://github.com/serut/meteor-coverage/issues/63). Here’s the link for the pull-request: https://github.com/serut/meteor-coverage/pull/73
The only downside of this approach is that we wouldn’t be able anymore to get the code-coverage of meteor-packages because I would have to add the plugin
istanbul to the babel-command compiling the code of the package. Anyone here who has an idea of what could help?
I already tried registering the plugin in a
package.json file which either is located in the folder of the meteor-package or the meteor application I’m trying to run this in.
If you want to play with it yourself, you can take this folder of the repo as starting point: https://github.com/SimonSimCity/meteor-coverage-app-exemple/tree/istanbul-babel-meteor-plugins/bare-exemple
I could also ask for baking it into the core, like the compilation of TypeScript: https://github.com/meteor/babel/blob/master/options.js#L120 or maybe do something to this repo https://github.com/meteor/babel-preset-meteor …
Would be glad for any hint.