-
-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
I'm using the @swc/plugin-formatjs to transform react intl messages, and I face an error for message that have string concatenation
const message = defineMessage({
defaultMessage: 'Hello ' + 'world'
});the result would be
const message = defineMessage({
defaultMessage: []
});And throw this error
Error: Uncaught [Error: [@formatjs/intl] An `id` must be provided to format a message
I found this issue (formatjs/formatjs#2252) in formatjs, which indicates that string concatenation should be supported for defaultMessage. I think it should be added here as well?
Metadata
Metadata
Assignees
Labels
No labels