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?
I'm using the
@swc/plugin-formatjsto transform react intl messages, and I face an error for message that have string concatenationthe result would be
And throw this error
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?