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

Fix for react-scripts 2.0.2, 2.0.3, 2.0.4 #28

Closed Corjen closed 5 years ago

Corjen commented 5 years ago

This should fix #24; since react-scripts 2.0.2 this doesn't work anymore.

The difference: 2.0.0: https://github.com/facebook/create-react-app/blob/react-scripts%402.0.0/packages/react-scripts/config/webpack.config.dev.js 2.0.2 https://github.com/facebook/create-react-app/blob/react-scripts%402.0.2/packages/react-scripts/config/webpack.config.dev.js

The main difference is that from 2.0.2 and up they've stop using use and instead went with loader, this should probably have something to do with a webpack upgrade?

I've also removed the svg loader fix, since this should be working if you're using the newest version of react-scripts(tested😅)

Anahkiasen commented 5 years ago

Quite the cleanup 👍

strothj commented 5 years ago

Hello, thank you for the pull request.

It will be until tonight (EST) at the earliest before I can test this and get it out the door.

Corjen commented 5 years ago

No rush from my side :)

I'm also closely watching this PR, which would enable TS in CRA 2: https://github.com/facebook/create-react-app/pull/4837#discussion_r222663640. Seems close to release

strothj commented 5 years ago

Merged in as v3. Thanks again.

I'm also watching the progress on that CRA 2 pull request. Will be nice to mark this package depreciated :-P