danieluhm2004 / serverless-webpack-prisma

When using serverless webpack, you can save up to 50% of package capacity by deleting unnecessary Prisma engine.
https://www.npmjs.com/package/serverless-webpack-prisma
MIT License
33 stars 27 forks source link

Prisma Generate Package Individually Only if In Use #8

Closed masanaikeshima closed 1 year ago

masanaikeshima commented 2 years ago

This plugins working great and the following is more of a query/request:

Currently we have a few lambdas, some of which don't use Prisma. If we use the option in serverless.yml:

package: individually: true

This leads to each function having the Prisma Generate script running (understandably as they are built in isolation). However a completely basic lambda that simply console.logs("Hello world") seems to still load in Prisma and results in the size for the function around 35MB.

Is there a way for functions that don't use Prisma to skip this process so we can reduce the Prisma footprint?

mcrstudio commented 2 years ago

Yeah this would be fantastic.

ekarmazin commented 1 year ago

Still an issue with functions which are not require prisma. Why this issue was closed with no details? Any workaround for this?