1.0.0 • Published 2 years ago
rollup-plugin-typecheck v1.0.0
rollup-plugin-typecheck
A TypeScript type checker plugin for Rollup
Installation
npm install --save-dev rollup-plugin-typecheckor via yarn:
yarn add --dev rollup-plugin-typecheckUsage
Create a rollup.config.js configuration file and import the plugin:
import typecheck from 'rollup-plugin-typecheck';
export default {
input: 'src/index.ts',
output: {
dir: 'output',
format: 'esm'
},
plugins: [
typecheck({
tsconfig: './relative/path/to/tsconfig.json',
shouldExitOnError: true,
})
]
};Then call rollup either via the CLI or the API.
Options
tsconfig
Relative path to tsconfig.json file
shouldExitOnError
If set to true, and TypeScript detects type error(s), then the rollup process will exit with code 1
1.0.0
2 years ago