rollup-typescript
Seamless integration between Rollup and TypeScript.
Why?
Because the origin repository hasn’t been maintained for a while.
Installation
# with npm npm install --save-dev rollup-typescript typescript# with yarn yarn add typescript rollup-typescript --dev
Usage
// rollup.config.js; input: './main.ts' plugins:
The plugin loads any compilerOptions
from the tsconfig.json
file by default. Passing options to the plugin directly overrides those options.
The following options are unique to rollup-plugin-typescript
:
-
options.include
andoptions.exclude
(each a minimatch pattern, or array of minimatch patterns), which determine which files are transpiled by Typescript (all.ts
and.tsx
files by default). -
tsconfig
when set to false, ignores any options specified in the config file -
typescript
overrides TypeScript used for transpilation
TypeScript version
This plugin currently requires TypeScript > 2.0. For earlier versions, use version 0.8.1.
Issues
Emit-less types, see #28.