🎁

preconstruct

GitHub

Building TypeScript packages

Preconstruct uses Babel to compile code so you have to configure Babel to use @babel/preset-typescript.

{
"presets": ["@babel/preset-typescript"]
}

Generating TypeScript declarations

Preconstruct automatically generates TypeScript declarations for all entrypoints in a package. There's no work required to configure this other than having your entrypoint source file be a .ts or .tsx file and having a tsconfig.json.