How to correctly build NestJS app for production with node_modules dependencies in bundle?
问题 After nest build or nest build --webpack dist folder does not contain all required modules and I got Error: Cannot find module '@nestjs/core' when trying to run node main.js . I could not find any clear instructions on https://docs.nestjs.com/ on how to correctly build app for production, so maybe I missed something? 回答1: Out of the box, nest cli does not support including the node_modules dependencies into the dist bundle. However, there are some community examples of custom webpack configs