-
-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
Describe the bug
Can't evaluate template literal.
Example Input:
import { FormattedMessage, defineMessage, formatMessage } from "react-intl";
const hello = "Hello";
const world = "world";
function HelloWorldComponent() {
return (
<>
<FormattedMessage defaultMessage={`~${hello}, ${world}!`} />
</>
);
}
export default HelloWorldComponent;Current Output:
import { FormattedMessage } from "react-intl";
const hello = "Hello";
const world = "world";
function HelloWorldComponent() {
return React.createElement(React.Fragment, null, React.createElement(FormattedMessage, {
id: "0H4U/a",
defaultMessage: [
{
"type": 0,
"value": "~, !"
}
]
}));
}
export default HelloWorldComponent;Expected Output:
import { FormattedMessage } from "react-intl";
const hello = "Hello";
const world = "world";
function HelloWorldComponent() {
return React.createElement(React.Fragment, null, React.createElement(FormattedMessage, {
id: "0H4U/a",
defaultMessage: [
{
"type": 0,
"value": "~Hello, world!"
}
]
}));
}
export default HelloWorldComponent;Metadata
Metadata
Assignees
Labels
No labels