Support Typescript incremental build
See original GitHub issueπ Feature request
- [ ] new
- [x] build
- [x] serve
- [x] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
Support of Typescript incremental build https://devblogs.microsoft.com/typescript/announcing-typescript-3-4-rc/
Issue Analytics
- State:
- Created 5 years ago
- Reactions:130
- Comments:52 (34 by maintainers)
Top Results From Across the Web
incremental - TSConfig Option - TypeScript
TSConfig. incremental ... How to create and type JavaScript variables. TypeScript in 5 minutes. An overview of building a TypeScript web app.
Read more >Incremental compilation with TypeScript while using --noEmit?
Is there a way I can run tsc --incremental --noEmit , actually incrementally compile, and only generate the tsconfig.tsbuildinfo file needed forΒ ...
Read more >Typescript: incremental builds - YouTube
Typescript incremental builds is a new feature in typescript version 3.4. With this feature we can increase the build time,Β ...
Read more >Upgrading To Typescript 3.5 And Incremental Builds
Upgrading To Typescript 3.5 And Incremental Builds Β· Background. TypeScript 3.4 added a new compiler option I was very excited about: theΒ ...
Read more >incremental-typescript - npm
Incremental TypeScript compiler. Latest version: 3.3.1-1, last published: 4 years ago. Start using incremental-typescript in your project byΒ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Transfering to the FW repo as the compiler doesnβt support TypeScript incremental API.
Example it uses
ts.createProgram
, instead ofts.createIncrementalProgram
with the latter is require to use the tsbuild info.I did experiment a bit using the NGTSC plugin API with allows for a program to be supplied and patching on a small project https://github.com/ngrx/platform/tree/master/modules/component/src I saw the compilation to go from
5s
to2.5s
.NB: NGTSC would also need to set versions to typechecking source files.
I should set expectations regarding the potential usefulness of supporting TSβs
--incremental
functionality right now. As a recap, this functionality from TS allows a typescript compilation to reuse artifacts from a previous compilation in order to be faster. This doesnβt apply to watch mode. It only applies to whole new compilations (e.g. calling the command from the console again).In an Angular CLI context this would mean that some calls to
ng build
,ng serve
andng test
might be faster after the first call. Ideally youβd want your slowest builds, usually the production builds, to get faster by using this new typescript functionality. But there are a lot of caveats here.First and foremost is that the typescript compilation is only one part of building an app, and not necessarily what takes longer. Then thereβs the fact that AOT compilation is not just a Typescript compilation, thereβs many other things happening there that have nothing to do with compiling TS. Another thing to take into consideration is that CI builds wouldnβt use this either unless you were very careful in managing the TS cache.
Realistically, this means that production builds wouldnβt see any improvement because they use AOT and a big chunk of the time is spent in bundle optimization. JIT development builds are what would benefit from TSβs
--incremental
functionality. But with Ivy itβs already preferable to develop in AOT, so no benefit again.I feel this feature looks very desirable because it sounds like it would make all builds much faster. But the reality is that it would make some of the faster builds a bit faster, while the others would remain the same. Notably rebuilds on watch mode are entirely unaffected, because this functionality isnβt related to watch mode.