Babel 7 plugins/modules + jest/ava


How do you use babel plugins with Meteor and a testing framework like jest or ava?

Meteor expects this .babelrc:

  "plugins": [ "my-plugin" ]

But jest/ava doesn’t work:

Cannot find module 'babel-plugin-my-plugin' from 'myapp'
    - If you want to resolve "my-plugin", use "module:my-plugin"

Fair enough, changed .babelrc to:

  "plugins": [ "module:my-plugin" ]

Now the tests work, but now Meteor doesn’t use the plugin when I run the app.

Does anyone have a solution?


I heard that you can have both babel 7 and babel 6 installed simultaneously.

If it doesn’t work with babel 7 it is worth trying babel 6 maybe.

Sadly I don’t have experience in it so it’s just a gut-guess


I installed Babel 6 & 7 at the same time and played with different configurations but the result is the same =(


Having the same issue. So far, I haven’t found any other way than switching .babelrc files. :frowning:

I posted here some time ago, but still didn’t get any response: