strothj / react-app-rewire-typescript-babel-preset

Add TypeScript support to Create React App using @babel/preset-typescript
https://react-app-rewire-typescript-babel-preset.netlify.com
MIT License
52 stars 6 forks source link

react-app-rewired@2.0.1 support #31

Open feimosi opened 5 years ago

feimosi commented 5 years ago

Would be great to add support for react-app-rewired@2.0.1 before deprecating this package, it's a very simple fix. Because of limited official TypeScript support in react-scripts I still actively use this package in production.

I've already fixed it here (just rewireWebpack.ts file changes): https://github.com/feimosi/react-app-rewire-typescript-babel-preset/commit/b1f8de5cfe54bee5168ce91cd3b924680bd7ca22#diff-a1bd5d0b107a0eb5ea012e4bec782aaeL4

v2.0.1 has removed all the helpers so we just need to restore them:

Related: https://github.com/timarney/react-app-rewired/issues/348#issuecomment-452199363