nx-electron icon indicating copy to clipboard operation
nx-electron copied to clipboard

Custom directory support for apps under NX /apps not working

Open keypuncherlabs opened this issue 1 year ago • 1 comments

Describe the bug When trying to create new projects under custom directories inside the /apps folder in the NX file structure, nx-electron is looking for the wrong dist folder during make/build.

To Reproduce Steps to reproduce the behavior:

  1. Created a new electron app and react-ui in a custom directory structure under '/apps' specified as '/apps/sonarfi/client/desktop'
  2. Build the react-ui and observe the dist output gets generated in the following folder structure by NX '/dist/apps/sonarfi/client/desktop/react-ui'
  3. When running the make command to build the electron app, it assumes a directory directly under '/dist/apps' and changes the slashes to dashes.
error

Expected behavior nx-electron should use the same directory structure generated by NX during build time 'dist/apps/sonarfi/client/desktop/electron-app' to find the project instead of 'dist/apps/sonarfi-client-desktop-electron-app/index.js'

Desktop (please complete the following information):

  • OS: Mac OS
  • Nx Electron Version 13.2.1

keypuncherlabs avatar Jul 17 '22 00:07 keypuncherlabs

Note, once manually copy over the directory and rename it to match the path nx-electron is looking for it works, but was hoping to find a more straight forward approach for this.

keypuncherlabs avatar Jul 17 '22 00:07 keypuncherlabs

Currently we only support the default nx structure (all apps should be directly below the /apps directory). We would be happy to include it to the project if you are willing to implement it.

bennymeg avatar Aug 29 '22 14:08 bennymeg

Okay great, I will certainly add to my list of things to work on. Thanks for the permission to update it.

keypuncherlabs avatar Oct 08 '22 05:10 keypuncherlabs

@keypuncherlabs did you get anywhere with this?

Hemesh-Unka avatar Jan 31 '23 14:01 Hemesh-Unka