Babel-plugin-istanbul how to ignore files?

Im using babel-plugin-istanbul and would like to ignore some files, I followed the instructions from the repository https://github.com/istanbuljs/babel-plugin-istanbul, but seems meteor doesn’t take them, I noticed on my terminal logs that it takes a .coverage.json, I also tried adding exclude there but still those files are taken on the coverage, could it be Im missing something?

Thanks a lot!

Have you found a solution?

Yes @ni-ko-o-kin

You need to create a file on the root folder of your project named: coverage.json

inside you need to structure it like this:

{
    "exclude": {
      "general": [
       "**/path/file.js",
       "**/anotherFile.js"
      ]
    }
}

That will exclude whatever files you add, so instanbul won’t track them

Hope this helps you.

Greetings!

Thx, but I missunderstood you question. I though you tried to use a .babelrc file to ignore files.

This is what I’m trying to solve:

No problem and yes, seems you issue is different than mine, My question was regarding babel-plugin-istanbul not babel alone.