I'm using NestJS for my Back-end application. I'm declaring my schema and my Dto with decorators like @Props() @Query() @Schema() @Body() and so on.
I'm also sharing some .ts files with my Front-end so I can also type my front-end code and still have one source of truth inside my whole project.
The problem is. The decorators make my front-end load some node_modules packages when imported. Is there a way to tell typescript not to include decorators, or to stop it from loading inside my node_modules when loading decorators ?
I already tried to "exclude": ["src", "node_modules"],
in my tsconfig.json, not working.
question from:
https://stackoverflow.com/questions/65941716/delete-typescript-decorators-when-importing-class-from-front-end 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…