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

Fix jest / babel config merging for CRA v4 #207

Merged
merged 1 commit into from
Oct 29, 2020

Conversation

mormahr
Copy link
Contributor

@mormahr mormahr commented Oct 29, 2020

As mentioned in #205 (or more specifically this comment) jest breaks with CRA v4.

The regex key, that determines if a file should be transformed with babel, changed. This causes craco to not be able to merge the custom babel config into the jest config.

The new key is "^.+\.(js|jsx|mjs|cjs|ts|tsx)$".

For backwards compatibility I used the same naming schema / method as for the 2.1.0 change before (this should probably be removed, as 2.1.0 isn't supported anymore anyways).

@mormahr mormahr mentioned this pull request Oct 29, 2020
@patricklafrance
Copy link
Contributor

Looks good, thank you :)

Yeah I wonder if CRACO should really be backward compatible? Doesn't make much sense to me right now. What do you think?

@patricklafrance patricklafrance merged commit a5db6ca into dilanx:master Oct 29, 2020
@mormahr
Copy link
Contributor Author

mormahr commented Oct 29, 2020

Yeah I wonder if CRACO should really be backward compatible? Doesn't make much sense to me right now. What do you think?

I mean not down to 2.x, because the README states 3.x (and in the future 4.x), but if it's only this and the eslint bug, then I don't see the need to drop support for 3.x. Probably makes upgrading easier if 3.x is supported for the time being.

@patricklafrance
Copy link
Contributor

Make sense! We'll see what's needed to fix eslint.

@mormahr mormahr deleted the fix-cra4-babel-jest-merge branch October 29, 2020 23:20
@AO19
Copy link

AO19 commented Nov 5, 2020

Thank you for this quick fix, any idea when the new release with this fix will be out?

@patricklafrance
Copy link
Contributor

@AO19 I will publish a release tonight, thanks for the reminder! :)

@patricklafrance
Copy link
Contributor

Released as https://www.npmjs.com/package/@craco/craco/v/5.8.0 sorry for the delay.

@AO19
Copy link

AO19 commented Nov 7, 2020

Thank you very much, no worries.

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

3 participants