Example using Babel

Hi guys, I’ve some troubles figuring how to set Babel transform plugins, to avoid messy Lodash imports that wreak havoc in my bundle.
It seems that my root babel.config.js is not read at all, neither are the .babelrc.js in my local packages (my app is structed in packages). The app is using typescript package at the root level, so that might be related.

I am able to provide information, but where should I start to debug this? The official documentation is not explicit at all upon the expected setup (do I need to use ecmascript package, should it work out-of-the-box, is it compatible with TypeScript…)


We use a .babelrc on the root and it is working

I confirm on new apps created with the skeleton it works as well on my machine, but I wonder how to debug this into an existing app. There is probably a package I miss that triggers the read of the Babel config. I’ve tried to add “ecmascript” to my project but the .babelrc is definitely not even read.

Edit: ok I think I got it:

  • Meteor doesn’t reckognize all possible namings for the .babelrc files. babel.config.js and .babelrc.js don’t work for instance (I wanted to use this syntax to allow requiring other files)
  • The root .babelrc is read only for root code, so only the config file within local packages matters