NestJS · Senior · Question 2 of 75
Why can a bundler or compiler without decorator metadata support break a Nest app?
- 1Nest needs the source maps
- 2Decorators are removed by Node.js
- ✓Correct answer: Without
design:paramtypes, Nest can't resolve constructor dependencies by type, so injection fails unless every parameter uses@Inject(token)
Explanation
esbuild, for example, doesn't emit decorator metadata. SWC supports it with the right config, which is why Nest documents an SWC setup.