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

feat: allow babelrc in babel-jest transformer #19

Merged
merged 1 commit into from
Aug 28, 2018
Merged

feat: allow babelrc in babel-jest transformer #19

merged 1 commit into from
Aug 28, 2018

Conversation

lee-reinhardt
Copy link
Contributor

Fixes #18

Verified that this fixes the outlined issue by testing with the example project.

Ran yarn add emotion react-emotion babel-plugin-emotion. Defined a styled component in a way that requires the Babel plugin:

const Box = styled.div`
  background-color: green;
`

Added this component to the body of App.tsx.

Ran yarn start. It fails to compile because of missing Babel plugin. Updated config-overrides.js with an injectBabelPlugin() helper for the emotion plugin. Verified app now works.

Ran yarn test. It fails to compile because of missing Babel plugin. Created a root .babelrc file and copy-pasted json config example I used in the docs. Verified test now works.

@strothj strothj merged commit c5d23c0 into strothj:master Aug 28, 2018
@strothj
Copy link
Owner

strothj commented Aug 28, 2018

Thanks again! Published as 2.4.0.

@codepunkt
Copy link

This just saved my day. Thanks! 🎉

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.

Unable to configure Babel for Jest
3 participants