You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.
Do you want to request a feature or report a bug?:
Feature
What is the expected behavior?:
I have a case where I've wrapped react-intl with my own module with some custom functions and components to manage internationalization. I don't want the need to import some elements from it and some from react-intl. I prefer to use just one source. I've mentioned it in this issue.
babel-plugin-react-intl accepts few options to manipulate extracting process. With extract-react-intl context, most of them are not so helpful (especially if we assume using it with by extract-react-intl-messages), but one is. I mean moduleSourceName which lets plugin to know from where defineMessages or <FormattedMessage /> is imported. Of course, default is react-intl but in some cases one may want to use custom module.
Suggested solution:
It would be great to be able to pass custom module name to extract-react-intl which can forward it to babel-plugin-react-intl (I've tested it locally, simply by explicitly adding options to unshifted preset in the source code and it works).
Same thing would fit extract-react-intl-messages.
@akameco, I can try to manage some changes if you want (but never done that on someones github repo 😉 ).
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?:
Feature
What is the expected behavior?:
I have a case where I've wrapped react-intl with my own module with some custom functions and components to manage internationalization. I don't want the need to import some elements from it and some from react-intl. I prefer to use just one source. I've mentioned it in this issue.
babel-plugin-react-intl accepts few options to manipulate extracting process. With extract-react-intl context, most of them are not so helpful (especially if we assume using it with by extract-react-intl-messages), but one is. I mean moduleSourceName which lets plugin to know from where
defineMessages
or<FormattedMessage />
is imported. Of course, default isreact-intl
but in some cases one may want to use custom module.Suggested solution:
It would be great to be able to pass custom module name to extract-react-intl which can forward it to babel-plugin-react-intl (I've tested it locally, simply by explicitly adding options to unshifted preset in the source code and it works).
Same thing would fit extract-react-intl-messages.
@akameco, I can try to manage some changes if you want (but never done that on someones github repo 😉 ).
The text was updated successfully, but these errors were encountered: