Skip to content

How nx-electron determines what node_modules to copy? #184

Answered by bennymeg
marko-hologram asked this question in Q&A
Discussion options

You must be logged in to vote

In newer versions you can create an application without a frontend, in v12 the compiled frontend will be copied to the packaged app.
However, you should be able to ignore it from the package using the files field in the maker.options.json (same as you did).
Furthermore, you can use the --generatePackageJson option to improve the desktop app modules tree shacking (i.e. nx build test-app-desktop --configuration=production --generatePackageJson).
Finally, you can ignore specific stray modules (i.e. "files": ["!**/node_modules/moment"]).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marko-hologram
Comment options

Answer selected by marko-hologram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants