-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
Hello, thank you for the great plugin!
I found one corner case of FormattedMessage rich text feature usage. Rich text replacements applied on runtime, instead of build time. This could be critical for SEO optimization and for page loading speed.
For example you have FormattedMessage like:
<FormattedMessage id="textWithLink" values={{
link1: msg => (
<a href="https://github.com/wiziple/gatsby-plugin-intl" >
{msg}
</a>
)}} />And translation:
"textWithLink": "I am text, click on <link1>link</link1> to open it",After build this line this line in index.html file looks like this :
I am text, click on <link1>link</link1> to open itBut expected behavior is- render it fully on build time and looks like:
I am text, click on <a href="https://github.com/wiziple/gatsby-plugin-intl" >link</a> to open itHere I made small reproduce repo:
https://github.com/ixzzd/gatsby-react-intl-formatted-message-repro
Steps to reproduce:
- Run
yarn build - Open
public/en/index.htmlfile - Search for "I am text" string
ghassanmas, blopa and dexterurbanski
Metadata
Metadata
Assignees
Labels
No labels