Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 1.65 KB

typescript.md

File metadata and controls

20 lines (12 loc) · 1.65 KB

TypeScript Configuration

Overview

TypeScript projects all have a tsconfig.json file in their project's root directory which is responsible for configuring type checking during development.

In addition to the standard tsconfig.json, there are more TypeScript config files specifically used for webpack processes. If there is just one webpack process, then there will only be a tsconfig.build.json.

If there are multiple webpack processes involved, then there will be multiple config files, each with a different suffix related to its build target. For example, the React + Express + PostgreSQL with Server-Side Rendering starter has a tsconfig.build.backend.json and a tsconfig.build.frontend.json.

These webpack-specific TypeScript config files extend tsconfig.json and override some of the options set in it so we can type check everything during development, but still skip type checking irrelevant files for the build (i.e. tests).

Note that the noEmit option is enabled as LJAS does not use tsc to compile TypeScript files. Instead, the webpack build process uses Babel to compile everything including TypeScript. We explain why we do this in the FAQ document.

Learning Resources