title: Build NodeJS back-end with dependencies for NWJS desktop application
body: <p>I have an application that is built with angular (FE), and Nestjs (BE).
  The application is working fine on the server.</p>
  <p>I am trying to combine the application with NWJS environment in order to create a desktop application.</p>
  <p>I can run the application coping FE build code and BE build code + node_modules to a folder in the NWJS environment.</p>
  <p>Now I need to build the BE including dependencies (NestJS, xml2json etc) to a single server.js file so that I do not need to copy the node_modules folder to NWJS environment to work the application.</p>
  <p>I tried to build with Webpack but the tool says</p>
  <blockquote>
  <p>the request of a dependency is an expression', 'Module not found:</p>
  <p>Error: Can't resolve 'pino-pretty' in ...</p>
  </blockquote>
  <p>when running the Webpack command.</p>
  <p>Is there any way to configure Webpack to build a single server.js file for NodeJS back-end application alone with its dependencies</p>
  <p>or</p>
  <p>any other build tool that can be suggested to achieve this task with an example would be highly appreciated.</p>
  <p><a href="https://nwjs.io/" rel="nofollow noreferrer">NWJS</a></p>
  <p><a href="https://nestjs.com/" rel="nofollow noreferrer">NestJS</a></p>
  <p>Thank you</p>