Open pauldraper opened 3 years ago
We also want this feature, for large monorepo project(40+ package), tsc build speed is too slow(may cost 10+ mins to compile whole project), even thou we could speed up build speed using esbuild, we still need to generate dts(which esbuild does not support), so we want generate dts without doing typecheck(which costs most of the time), we also use transpileModule on serve side to transform es6 code to es5, which typecheck slows the build speed and makes no sense on server side.
It's not possible yet. The transformer has some dependency on the type checker.
eg: EmitResolver.createTypeOfDeclaration
We have:
let a = 1
transform to:
declare let a: number;
Which means It's not pure syntax transform. We have to check the type to create the type annotation number
.
or large monorepo project(40+ package), tsc build speed is too slow
transpileModule tis the only way.
Side note: Kind of odd you can't do it via CLI.
Search Terms
transformer, type check, transpileModule
Suggestion
Run transformers, but skip type checking.
Use Cases
The majority of compile times are type checking.
Some projects (e.g. Angular stylesheet integration) require transformers to run.
I would like to skip type checking, ala transpileModule, but still run the transformer.
https://github.com/angular/angular-cli/issues/19587
Examples
Checklist
My suggestion meets these guidelines: