rollup/rollup-plugin-typescript

Please archive this project and put deprecated in the title

rosskevin opened this issue ยท 6 comments

I spent a fair amount of time hunting down many errors since adding this plugin innocuously downgraded typescript from 2.8.x to 1.8.9. Given I was working on build process in the monorepo and introducing rollup, it took me a couple of hours to figure out that the typescript dependency was forced down.

Given this repo is unmaintained, please go to settings and mark it as archived at a minimum to warn others that this rollup org project is not one with which they should use.

Maybe Rollup maintainers could bring https://github.com/ezolenko/rollup-plugin-typescript2 under the Rollup organisation? What do you think @Victorystick?

I had already installed this when I saw WTF 1.8.9?

import typescript from 'typescript'; //your TS version

const plugins = [typescriptPlugin({typescript})];

@kemsky that does not help because the plugin tries to invoke readConfigFile function on the given typescript option and gets TypeError: typescript.readConfigFile is not a function error.

Sorry, that is my bad. Please ignore my previous comment.

@rosskevin the fact of some project isn't receiving updates, doesn't mean it is deprecated or doesn't work well today.

For me, it worked fine at first try, you just need to set proper typescript version into plugin options to work as expected.

  1. Import the current typescript version you're using, into rollup.config.js
import typescript from 'rollup-plugin-typescript'
  1. Next in plugin's options, set that typescript module in typescript param
typescript({
    typescript: require('typescript')
})