bennymeg / nx-electron

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

Option `targets` is omitted when `prepackageOnly` is true #125

Closed pillsilly closed 2 years ago

pillsilly commented 2 years ago

https://github.com/bennymeg/nx-electron/blob/b1587cde5f287886d793c2784deb5b2cfee8505c/src/builders/package/package.impl.ts#L176

"omitting targets when prepackageOnly is true" sounds like a undocumented side-effect -- It took me sometime to figure out by debugging.

May I know the reason of the behavior? And would it be reasonable to update the doc(I can do it if it'll be confirmed)?

@bennymeg

bennymeg commented 2 years ago

I think this separation can be amended now (as if: removing the else clause so it will be always invoked). I will test as soon as I finish v12 and I will have some time. Thanks for letting me know.

julianpoemp commented 2 years ago

--platform is also ignored, if prepackageOnly is true...

bennymeg commented 2 years ago

Should be fixed on v12.0.0-beta.3.

bennymeg commented 2 years ago

It seems that it is not possible to package an application for multiple targets (the 'dir' and 'targets' options cannot be provided togather). Please use the 'make' executer instead.