Speed up twenty-emails build by replacing vite-plugin-dts with tsgo (#17857)

## Summary

- Removed `vite-plugin-dts` (which used `tsc` internally) from the Vite
build and replaced DTS generation with `tsgo` as a sequential post-build
step — **~0.7s vs 1-10s**.
- Disabled `reportCompressedSize` to skip gzip computation for 64 output
files.
- Converted the build target to an explicit `nx:run-commands` executor
with sequential `vite build` → `tsgo` commands.

The `twenty-emails:build` step goes from ~22s to ~7s under load. 

## Test plan

- [x] `nx build twenty-emails` produces both JS (64 files) and DTS (74
files) correctly
- [x] `dist/index.d.ts` exports match the source `src/index.ts`
- [x] Full `nx build twenty-server` succeeds end-to-end
- [ ] CI build passes


Made with [Cursor](https://cursor.com)

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Félix Malfait
2026-02-13 11:39:26 +01:00
committed by GitHub
parent 975c64bf3d
commit 216a7331f8
9 changed files with 93 additions and 23 deletions
@@ -2226,6 +2226,7 @@ export const STANDARD_OBJECTS = {
{
universalIdentifier: string;
viewFields: Record<string, { universalIdentifier: string }>;
viewFieldGroups?: Record<string, { universalIdentifier: string }>;
viewFilters?: Record<string, { universalIdentifier: string }>;
viewGroups?: Record<string, { universalIdentifier: string }>;
}