Skip to content

How to use new react-env API? #4764

Answered by GiladShoham
ivansky asked this question in Help
Discussion options

You must be logged in to vote

First, your old implementation should have been still working, but indeed, there was a bug with the types config that broke due to the useTypescript API. this has been fixed here - #4788 and it will be part of the next nightly
About your useTypescript implementation, it's correct, the only part you miss is to pass it inside the react.compose.
it should be something like this:

const customReactEnv = react.compose([
    react.overrideJestConfig(JestConfig, require.resolve('jest')),
    react.useTypescript(...),
    react.usePrettier(...),
    react.useEslint(...),
]);

Please try putting it inside the compose and let me know if it worked as expected.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by GiladShoham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants