Package Exports
- rollup-plugin-typescript
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rollup-plugin-typescript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rollup-plugin-typescript
Seamless integration between Rollup and Typescript.
Why?
See rollup-plugin-babel.
Installation
npm install --save-dev rollup-plugin-typescriptUsage
import { rollup } from 'rollup';
import typescript from 'rollup-plugin-typescript';
rollup({
entry: 'main.ts',
plugins: [
typescript({
sourceMap: true
})
]
}).then(...)All options are as per the Typescript's Compiler Options, except options.include and options.exclude (each a minimatch pattern, or array of minimatch patterns), which determine which files are transpiled by Typescript (by default, all files are transpiled).
Issues
TypeScript (as of 1.6.2) isn't able to transpile to ES5 while preserving ES2015 modules. This means that only TypeScript specific extensions are stripped from the code during transpilation. A second pass will be needed to target ES5.
This issue seems to be addressed by (the currently unreleased) TypeScript 1.7.0 🎉.
License
MIT