You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to add translations to my library using react-intl. There is an associated babel plugin, babel-plugin-formatjs, that transforms and compiles the messages to be translated.
$ tsdx build
@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to true, as the next major version will default
🚨 /Users/.../tsdx-formatjs-repro/dist/testintl.esm.js: /Users/.../tsdx-formatjs-repro/dist/testintl.esm.js: message.trim is not a function
I'd like to add translations to my library using react-intl. There is an associated babel plugin,
babel-plugin-formatjs
, that transforms and compiles the messages to be translated.To Reproduce
Git Repro URL
https://github.com/danielstreit/tsdx-formatjs-repro
Reproducible Steps/Repo
Steps to reproduce the behavior:
npx tsdx create mylib
yarn add react-intl babel-plugin-formatjs
yarn build
Expected behavior
Messages in the build output should:
defaultMessages
should be compileddescription
should be omittedSee build output here: https://github.com/danielstreit/tsdx-formatjs-repro/blob/main/dist/testintl.esm.js.
intl.formatMessage
is transformed as expectedFormattedMessage
is not transformed at allSuggested solution(s)
I'm not sure. I'm having trouble determining the root cause. Any help in identifying or debugging it would be greatly appreciated
Your environment
The text was updated successfully, but these errors were encountered: