Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
It seems when using swc, we cannot generate the *.d.ts files [1,2] needed by, e.g., MikroOrm's TsMorphMetadataProvider [3,4]. One of the workarounds to call tsc -p tsconfig.declaration.json, with
// tsconfig.declaration.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": true,
"declaration": true,
"declarationDir": "./dist"
}
}
after the building step.
However, when using nest start, this will require manually splitting the start command into:
- Setting
"deleteOutDir": false in the compilerOptions of nest-cli.json
rm -rf ./dist
nest build
tsc -p tsconfig.declaration.json
nest start
which seems cumbersome.
Describe the solution you'd like
It would be convenient if we could do something like nest --generate-declarations start or nest build && tsc -p tsconfig.declaration.json && nest --skip-builder start (or nest --builder none start). We may add some checks before the this.runBuild line in start.action.ts to achieve this.
Teachability, documentation, adoption, migration strategy
No response
What is the motivation / use case for changing the behavior?
See the first section.