How to correctly build NestJS app for production with node_modules dependencies in bundle?

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 that include the dependencies in the bundle, e.g. bundled-nest. As described in this issue, it is necessary to include the webpack.IgnorePlugin to whitelist unused dynamic libraries.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)