-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider changing project direction #29
Comments
Wow, I've thought about it in case of
It looks like there is a bug in the compiler (microsoft/TypeScript#31696) and it can broke a pipeline in some cases (yeah, it don't work for composite projects only for now).
For me it's not a big problem. In current project I'm working on (https://github.com/tradingview/lightweight-charts) we don't use any plugin for rollup to work with TypeScript and compile it with tsc first and then bundle with rollup. |
I'm in favor of this new direction. I'll be using rollup-plugin-typescript2 instead, which has its own caching system and it works with |
the plugin now only supports `.d.ts` files as inputs, #29
just published Also, I think I found a workaround for I will try this version with one of my other projects, clean up the readme/docs a bit and then release it as @timocov the @renovate-bot also pointed me to a recent regression in typescript related to exporting namespace declarations: microsoft/TypeScript#31676 maybe that is also relevant for you. |
I have been thinking a lot lately about TS project management in general and even started a small blog series on this topic. This, combined with some issues and requests for this projects made me rethink the project direction.
I would appreciate some feedback on these ideas.
CC @aleclarson @robhicks @timocov @octogonz
How it works now
The plugin currently uses the typescript
createProgram
andemit
APIs to basically typecheck your whole code ahead of time, and emitdeclaration
files for each source file.This is:
compilerOptions
, and to use the ts API in general.watch
Plugin interferes with Rollup watch #15How I think it should work in the future
I think to move forward, its needed to take a step back. Let some other tool worry about compiling typescript, and focus only on bundling pre-generated
.d.ts
files, similar to how api-extractor works.So it would use the typescript compiler as a parser only.
Pros
watch
mode--incremental
, etc), and about how they want to bundle their.js
code.Cons
.ts
->.js
/.d.ts
compilation themselveswatch
mode would require two separate watchers (tsc --watch
androllup --watch
?)The text was updated successfully, but these errors were encountered: