-
Notifications
You must be signed in to change notification settings - Fork 122
FormattedMessage evaluated twice, description is removed and enforceDescriptions fails #22
Comments
Output with enforceDescriptions = false;
Console.log output from storeMessage(): id, description, defaultMessage
|
I cannot reproduce the double-parsing behavior you mention. What version of Babel are using? How many copies of
The The plugin option to |
Hi, I'm only using 1 npm package, here is a sample package.json within a project https://github.com/rvulpescu/babel-plugin-react-intl-test I ran it and it gives the same issue. Run npm install then babel --plugins react-intl sample.js.
Otherwise it might be one of my global npm packages.
|
It seems that the But later on, storeMessage(descriptor, path, state); is called again. This is a stack trace from a single execution, callbacks set twice?
I'll let you debug it, I've went towards a different aproach by taking all the messages in a separate json file and importing them into the build. As for the release, I wrote a custom grunt task that would merge the proper object key/values. |
You're running the plugin twice: it's defined in the Use:
Not:
Since you already include the |
Oh, that's so silly. Sorry about that, it's my first babel project :) |
Hi,
I'm using this message which the extraction plugin (v 2.0) parses twice.
I also attempted using defineMessages();
For some reason the description attribute is being removed and the final .json does not contain the description of the message. If mandatory descriptions are required, the parsing will stop since this message is invalid.
Why do you remove it at index.js#178?
The text was updated successfully, but these errors were encountered: