1.0.0 • Published 1 year ago

rollup-plugin-typecheck v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

rollup-plugin-typecheck

A TypeScript type checker plugin for Rollup

Installation

npm install --save-dev rollup-plugin-typecheck

or via yarn:

yarn add --dev rollup-plugin-typecheck

Usage

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

1 year ago