- Install create-react-app
npm i -g create-react-app
- Generate a new react app using the typescript loader
create-react-app react-typescript-boilerplate --scripts-version=react-scripts-ts
- Rewire the create-react-app. Note that the package.json will have to be updated to reflect the usage of the typescript scripts of the create-react-app
"scripts": {
"start": "react-app-rewired start --scripts-version react-scripts-ts",
"build": "react-app-rewired build --scripts-version react-scripts-ts",
"test": "react-app-rewired test --env jsdom --scripts-version react-scripts-ts",
"eject": "react-app-rewired eject"
}