bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
331 stars 85 forks source link

Custom directory support for apps under NX /apps not working #174

Closed keypuncherlabs closed 2 years ago

keypuncherlabs commented 2 years ago

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):

keypuncherlabs commented 2 years ago

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.

bennymeg commented 2 years ago

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.

keypuncherlabs commented 2 years ago

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

Hemesh-Unka commented 1 year ago

@keypuncherlabs did you get anywhere with this?