项目作者: fi3ework

项目描述 :
🚀 Rollup plugin that runs typescript type checker on a separate process.
高级语言: TypeScript
项目地址: git://github.com/fi3ework/rollup-plugin-fork-ts-checker.git
创建时间: 2020-05-06T09:34:29Z
项目社区:https://github.com/fi3ework/rollup-plugin-fork-ts-checker

开源协议:MIT License

下载


rollup-plugin-fork-ts-checker

The project is currently in alpha phase.

fork-ts-checker-webpack-plugin is a great Webpack plugin that saves time from waiting for type checking. This repo heavily relies on fork-ts-checker-webpack-plugin, core logic of type checking is directly imported from it, with a adapation for Rollup.

npm CI npm

Usage

Install with NPM

  1. npm i fork-ts-checker-webpack-plugin -D

or with Yarn

  1. yarn add fork-ts-checker-webpack-plugin -D

The original idea for this plugin was to work with rollup-plugin-typescript2. It also could work with any none type checking TypeScript compile tool.

Here’s a simple Rollup config example work with rpt2:

  1. const rpt2 = require('rollup-plugin-typescript2')
  2. const ftc = require('rollup-plugin-fork-ts-checker').default
  3. export default {
  4. input: 'src/index.ts',
  5. plugins: [
  6. ftc({
  7. // Plugin options, mostly same as fork-ts-checker-webpack-plugin.
  8. // See https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#options
  9. // Some options can't be supported. See Caveat section for detail.
  10. }),
  11. rpt2({
  12. // Disable type checking of compiler, leave it to ftc.
  13. check: false
  14. })
  15. ],
  16. output: {
  17. file: 'bundle.js',
  18. format: 'cjs'
  19. }
  20. }

Caveat

Most options are completely same as fork-ts-checker-webpack-plugin. But some functionality can not be supported.

  • Webpack related configurations (e.g. ts-loader, happypack).
  • vue (could be supported, still WIP).

License

MIT