akameco / babel-plugin-react-intl-auto

i18n for the component age. Auto management react-intl ID.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[feature] Injection API support (intl.formatMessage)

jmarceli opened this issue · comments

Thanks for this plugin and your time spent on its development.

Do you have any plans for adding Injection API support?

Currently, the following code won't be extracted and id won't be autogenerated:

intl.formatMessage({ defaultMessage: 'Hello' })

As far as I'm aware in babel-plugin-react-intl there is already a PR waiting for a merge with this feature supported (formatjs/babel-plugin-react-intl#165).
I would be happy to help with implementation but I have no experience with Babel plugins development.

If that PR is merged, I will implement it.

Feel free to merge my PR if you find it useful #68, or let me know if there is anything that I should improve.

ref #68