NestJS · Senior · Question 60 of 75
How can you enforce module boundaries automatically in a Nest monorepo?
- 1Nest blocks cross-module imports at runtime
- ✓Correct answer: With lint rules on imports (e.g. Nx module boundary rules or dependency-cruiser) that forbid reaching into other modules' internals
- 3By using global modules
Explanation
TypeScript lets any file import any other; tooling keeps the intended architecture from eroding.