bennymeg / nx-electron

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

wrong name for preload.ts file? #165

Closed tmtron closed 2 years ago

tmtron commented 2 years ago

Describe the bug 13.0.0 generates: dist/apps/app/main.preload.ts.js
I think it should not include .ts: e.g. dist/apps/app/main.preload.js
because this is also what is used in app.ts; preload: join(__dirname, 'main.preload.js'),

To Reproduce

  1. npx create-nx-workspace@13 --name=nxelectron13 --preset=angular --appName=ng --style=scss --nxCloud=false
  2. cd nxelectron13/
  3. npm install -D nx-electron
  4. nx g nx-electron:app app --frontendProject=ng --directory=
  5. nx build ng
  6. nx build app
  7. then check the file in dist/apps/app/

Expected behavior the file should be called dist/apps/app/main.preload.js (without .ts)

Desktop (please complete the following information):

bennymeg commented 2 years ago

Probably fixed in #164.

tmtron commented 2 years ago

Is there a workaround until a new version is released? Or is there a simple way to test the current master branch of this repository in my project?

paustint commented 2 years ago

@tmtron here is my workaround - add this to your nx project.json under targets -> build -> options config - this will have nx compile and output this file separately from the main app.

        "additionalEntryPoints": [
          {
            "entryName": "main.preload",
            "entryPath": "apps/app-name/src/app/api/main.preload.ts"
          }
bennymeg commented 2 years ago

Please try v13.1.1

tmtron commented 2 years ago

verified, that this is fixed in version 13.1.1