
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
react-scripts-ts
Advanced tools
react-scripts-ts
Create React apps (with Typescript) with no build configuration.
Do you know react and want to try out typescript? Or do you know typescript and want to try out react? Get all the benefits from create-react-app
but you use typescript! π
npx create-react-app my-app --scripts-version=react-scripts-ts
cd my-app
npm start
# or with yarn
yarn create react-app my-app --scripts-version=react-scripts-ts
cd my-app
yarn start
(npx comes with npm 5.2+ and higher, see instructions for older npm versions)
Then open http://localhost:3000/ to see your app.
When youβre ready to deploy to production, create a minified bundle with npm run build
.
In general, most upgrades won't require any migration steps to work, but if you experience problems after an upgrade, please file an issue, and we'll add it to the list of migration steps below.
<2.16.0
to >=2.16.0
Since 2.16.0
, the template uses different tsconfig
files for both development and production mode. For the latter, unfortunately, the path resolver is not smart enough to fall back to the basic tsconfig.json
in case the expected tsconfig.prod.json
is not present, so you have to create this file manually like shown here.
<2.13.0
to >=2.13.0
Since 2.13.0
, typescript
is listed as a peer dependency of react-scripts-ts
. For projects generated with at least this version, the init script takes care of properly installing it as dev dependency to the generated projects. Older projects require manual installation, in case you have not already done that.
Using npm
:
npm i -D typescript
Using yarn
:
yarn add -D typescript
<2.5.0
to >=2.5.0
Version 2.5.0
introduces a new config file for jest, that is necessary for the tests to run. If you were previously running a version older than v2.5.0
and upgraded to v2.5.0
or newer, you need to manually add the new file, or else you'll get an error similar to this when trying to run your tests:
Test suite failed to run
{
"messageText": "Cannot read file 'C:\\[project]\\tsconfig.test.json': ENOENT: no such file or directory, open 'C:\\[project]\\tsconfig.test.json'.",
"category": 1,
"code": 5012
}
To fix this, create a new file in the root of the project called tsconfig.test.json
, and paste the content of this file into it. Everything should work now. For more info, please see this issue.
moduleNameMapper
config override - @sebald--watchAll
to be set - @DorianGreyreact-scripts@1.0.17
This included changes that were not published by the facebook upstream, so was unpublished.
typescript
version to 2.3.x until 2.4 @types are fixedextend
) - Thanks to @DorianGreyreact-scripts@1.0.6
tslint@5.2.0
- thanks to @mindjuicesource-map-loader
- thanks to @Place1typescript@2.3.3
- thanks to @sjdwebreact-scripts@1.x.x
@types
were being installed on initcli-highlight
dependencynpm run build
setupTest.ts
npm run build
eslint
to tslint
tsconfig.json
typescriptTransform.js
when running npm run eject
FAQs
Configuration and scripts for Create React App.
The npm package react-scripts-ts receives a total of 8,202 weekly downloads. As such, react-scripts-ts popularity was classified as popular.
We found that react-scripts-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Γ faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.