rollup-typescript v1.2.1
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 --devUsage
// rollup.config.js
import typescript from 'rollup-typescript';
export default {
input: './main.ts',
plugins: [
typescript(),
],
}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.includeandoptions.exclude(each a minimatch pattern, or array of minimatch patterns), which determine which files are transpiled by Typescript (all.tsand.tsxfiles by default).tsconfigwhen set to false, ignores any options specified in the config filetypescriptoverrides 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.