-
Notifications
You must be signed in to change notification settings - Fork 109
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
Support for typescript incremental compilation #347
Comments
This sounds nice! It seems an API for incremental builds was added recently, I'll see if I can squeeze this into the 5.0.0 release |
Update, still waiting for the API to be completed, typings are missing in |
Hi, I was wondering if this is still blocked? |
It looks like the API is complete now, I just installed typescript@3.6.3! |
PR #353, for those of you interested in this feature, should this be a feature that can be toggled on/off or should the compiler just silently use the incremental API if available? |
If the tsconfig has the "incremental" property set, it should just use that. Otherwise, I think enabling by default is fine. PS: Thanks for getting this out! Excited to use it in our projects. |
I've poked around the source code for |
That seems reasonable enough |
A bit of a dilemma: karma-typescript does all its work in-memory, ie all .ts files are compiled and served directly to Karma, no compiled versions of the .ts files are ever written to the file system, which is kind of the main selling point of this plugin, it won't touch the project structure. On the other hand, the new incremental feature of the Typescript compiler is meant to speed up cold builds by reading information about the project graph from the last build, stored on disk. This makes it hard to add this new feature to the karma-typescript compiler, because if the source files haven't changed (according to the Ideas? |
Is the issue that you don't want to write back out to the |
If karma-typescript would write to the To summarize the problem: the typescript compiler relies on what the compiled version of the project looks like on disk and karma-typescript does all its work in-memory, I don't think this is going to work 😞 One way to solve this might be if karma-typescript would keep a temp cache (out of the project folder) with the transpiled .js files along with a "private" Also note that when running karma in watch mode, karma-typescript already mimics the |
Closing this since this isn't doable 😞 |
In typescript 3.4+ they've added support for incremental compilation which would allow subsequential compilation runs to be much faster. Is this something that could be supported by karma-typescript?
https://devblogs.microsoft.com/typescript/announcing-typescript-3-4-rc/
The text was updated successfully, but these errors were encountered: