How to change outputDir (/build) of TypeScript code in create-react-app

Viewed 4455

I am using create-react-app with TypeScript template to manage my React project (yarn create react-app my-app --template typescript)

When I run react-scripts build my code is built into /build folder. How to customize this directory?

I tried to change outDir of compilerOptions in tsconfig.json, but this seems ignored by CRA.

2 Answers

You can set BUILD_PATH and do as such on Windows set \"BUILD_PATH=new-folder\" && react-scripts build

Related