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

Fixes #63 #64

Merged
merged 3 commits into from
Mar 2, 2020
Merged

Fixes #63 #64

merged 3 commits into from
Mar 2, 2020

Conversation

lensbart
Copy link
Contributor

@lensbart lensbart commented Jan 14, 2020

What: Append a the react-intl babel plugin only when the user didn’t already do this themself

Why: I couldn’t get the software to work, and after some digging I found a fix.

How: Not sure in what way my setup is different from others, so I tried changed the code in a way I think makes sense

Checklist:

  • Documentation
  • Tests (N/A)
  • Ready to be merged
  • Added myself to contributors table

Append a the `react-intl` babel plugin only when the user didn’t already do this themself
as per the checklist in pull request template
@lensbart
Copy link
Contributor Author

I was too fast with submitting this pull request and can tell that this is not the solution. Once I figure it out, I will revisit

@lensbart lensbart closed this Jan 14, 2020
@lensbart
Copy link
Contributor Author

lensbart commented Jan 15, 2020

After looking into the issue some more, I think the docs should indicate that this plugin works along react-intl-auto and react-intl. The output file is generated correctly when I include this in .babelrc.js, in addition to commenting out the lines presets.unshift(...) as per this pull request:

['react-intl-auto', { removePrefix: 'app/' }],
[
  'react-intl',
  {
    extractFromFormatMessageCall: true,
    messagesDir: 'build/extract-messages'
  }
]

Installing react-intl is not needed because it’s a dependency, but is probably a good practice.

@lensbart lensbart reopened this Jan 15, 2020
@akameco akameco merged commit f17c6fc into akameco:master Mar 2, 2020
@akameco
Copy link
Owner

akameco commented Mar 2, 2020

@lensbart Great 💯 Thank you 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants