Typescript is used as the default compiler in Bit's official envs. To learn how to use Typescript in an env that uses a different compiler, see Typescript configuration.
Typescript uses the same standard commands used by all compilers.
Compile all components in the workspace:
The compiled code can be found in each component's corresponding package, in the workspace
Run the the compiler in 'watch mode' (recompile on component changes):
When running Bit's dev server (
bit start), the compiler runs in 'watch mode', by default.
--check-types to get type errors during development (by default, type-checking happens only during build):
Run the following to compile during build:
By default, the compiler outputs the compiled files to the
dist directory, in each component's capsule.
In addition to the compiled JS files, the
dist directory may include the generated declaration files, and copied files that cannot be compiled by the compiler.
. ├── welcome.d.ts ├── welcome.js ├── welcome.js.map ├── welcome.module.scss ├── index.d.ts ├── index.js └── index.js.map