This repository has been archived by the owner on Aug 21, 2019. It is now read-only.
Allow to specify custom module name passed to babel-plugin-react-intl #20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New option enabled to define module name from where elements defining messages are being imported (instead of default reacti-intl). It is passed to babel-plugin-react-intl
Why:
In case of using custom module based on react-intl, importing defineMessages from it successfully defines messages for an app, but later extraction is not possible without feature mentioned above.
Checklist:
I was wondering, if adding only moduleSourceName option from all babel-plugin options is OK or not. I think other options are not important (or even do not make sense) in case of extract-react-intl context.
What I mean is:
I wait for other opinions, so if someone consider those needed, I can update the code.