Is it possible to run babel-plugin-react-intl with Meteor?

Hi,

I’m working on my first React app, and I’m trying to figure out how to get translations going. Ideally, I want the language string IDs to be extracted from my components automatically, and this I think is what babel-plugin-react-intl is doing.

Following the package instructions, I’ve modified my .babelrc file;

{
  "plugins": [
    "transform-class-properties",
    [ "react-intl", {
      "messagesDir": "./imports/translations/",
      "enforceDescriptions": false
    }]
  ]
}

But unfortunately, although Meteor rebuilds (so it is watching the .babelrc file), the language files are not generated. Is this something that is not possible because of the way that the Meteor build tool has implemented Babel (@benjamn)?

1 Like

FYI: a way I found to get it working is use an absolute path for messagesDir. Supposedly, this will be fixed in a coming Meteor update.