reactjsbabeljswebpack-2react-intlbabel-plugin-react-intl

babel-plugin-react-intl - Plugin doesn't seem to do anything


I have installed the babel-plugin-react-intl plugin, and added this to my .babelrc file. I m trying to get the extract messages from my jsx files. My component sources are in ./src

{
  "presets": [
    "es2015",
    "react",
    "stage-0"
  ],
  "plugins": [
    "transform-object-rest-spread",
    ["transform-runtime", {
      "helpers": false,
      "polyfill": false,
      "regenerator": true,
      "moduleName": "babel-runtime"
    }],
    [
      "react-intl", {
        "messagesDir": "./build/messages",
        "enforceDescriptions": false
      }
    ]
  ]
}

But nothing happens ! Does anyone perhaps have an idea how to get this plugin working ?


Solution

  • Finally I have found the trouble ;-). It was on my webpack.config.js file, the parameter babelrc was setting to false instead of true on the module rule part.