Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babylon throws error on decorator #41

Open
ppozniak opened this issue Feb 21, 2018 · 3 comments
Open

Babylon throws error on decorator #41

ppozniak opened this issue Feb 21, 2018 · 3 comments

Comments

@ppozniak
Copy link

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

@maxence-lefebvre
Copy link

maxence-lefebvre commented Mar 24, 2018

Hi !

I've got the same issue, did you find a workaround ?

Thank you


react-intl-cra: 0.3.3

@evenchange4
Copy link
Owner

evenchange4 commented Mar 26, 2018

React-intl-cra does not work with decorator. Only if the official Create-react-app support it.

@dachinat
Copy link
Contributor

dachinat commented Apr 4, 2018

@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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants