Purge dependencies which are not called in runtime
See original GitHub issueWhen bundling a project with prisma2 included as a dependency, a very large bundle (>50MB) gets generated, which may not be uploaded to AWS Lambda. While prisma2 is used for generating files during build time, it isn’t depended upon in runtime.
As mentioned here, inclusion and exclusion of modules should be possible. By default, files referred (transitively) by bin inside the package.json of each dependency should be excluded.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Safe removal of "unused" runtime dependencies
I'd like to remove these "unused" dependencies, but I'm worried about the application failing at runtime. The ignoreNonCompile option I enabled ...
Read more >Transforming dependency artifacts on resolution
When the dependency does not have a variant with the requested attributes, resolving the configuration fails. Sometimes it is possible to transform the...
Read more >Managing Dependencies - UiPath Documentation Portal
To remove all unused dependencies in the project, select Remove Unused > Dependencies in the Studio ribbon, or use the Ctrl + Shift...
Read more >Apache Maven Dependency Plugin – Usage
mvn dependency:purge-local-repository. To add the restriction that the org.apache.maven:maven-plugin-api artifact not be deleted, we ...
Read more >Dependency injection in action - Angular
The TITLE provider token is not a class, but is instead a special kind of provider lookup key called an injection token, represented...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Awesome that it fixed you problem (except for the issue with nexus-prisma)! Don’t hesitate to join our Build Beta (if you haven’t yet), as there are several bug fixes related to Netlify Functions which are included in it. And please let us know of any other issues you might have 😃
As @DavidWells is pointing out, the real fix for this issue would be the possibility to explicitly exclude specific node modules from the bundles, as outlined in #68.
I’ve just implemented a temporary workaround available in
zip-it-and-ship-it@0.4.0-8in the meantime, that should solve your specific case. This fix should also be available in our new Build beta.