-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial 'package.json' support #88
Comments
To add to what you've wrote, Thanks for the great plugin. |
i had this crazy idea and people still think i am crazy: use dev dep everywhere will significantly reduce your artifact size |
This feature would be great. Are there any plans to add this? It would also allow a version from the partial package.json rather than using the nx root package.json for versioning. Unless I'm missing something? |
Added on v12. |
Description
Add support for packaging using automatically generated partial
package.json
support.This should reduce greatly the artifact size in many cases.
Additional context
This should be used in conjunction with
generatePackageJson
option during build time.Rational
NX-ELECTRON projects are mainly divided into two parts: frontend and backend.
Due to the nature of a monorepo project, only single 'package.json' file exists in the repository.
Modern front end platforms (e.g. angular) can overcome this issue by picking and bundling only the dependencies that are in use.
However, that's is not always the case with electron applications development.
Moreover, since electron application might use native dependencies, such tools can't be used since it is not recommended to bundle the backend project into single file.
Hence, we have a
node_modules
folder in the generated package, and since the dependencies tree can be huge, this reflects in the packaged app size.On v11 we have added the functionality to dynamically generate dependencies tree to the electron backend project.
We can take leverage of this functionality in order to shake the dependency tree for the backend project.
The text was updated successfully, but these errors were encountered: