react-intl-cra
react-intl-cra copied to clipboard
Babylon throws error on decorator
react-intl-cra './src/**/*.js' -o messages.json
/home/ppozniak/.config/yarn/global/node_modules/babel-core/lib/transformation/file/index.js:590
throw err;
^
SyntaxError: unknown: Unexpected token (8:0)
6 | import { Text, LogoWrapper } from '@common';
7 |
> 8 | @connect(state => ({
Additionally I am unable to run react-intl-cra
locally. I had to install it globally or use node ./node_modules/react-intl-cra/bin
Hi !
I've got the same issue, did you find a workaround ?
Thank you
react-intl-cra: 0.3.3
React-intl-cra
does not work with decorator. Only if the official Create-react-app support it.
@maxence-lefebvre @ppozniak if your problem is specifically transform-decorators
not being loaded while parsing files, I have submitted a PR, you can use @dachinat/react-intl-cra
and change script to something like
"extract": "react-intl-cra 'src/**/*.js' -o 'en.json' -b transform-decorators"