Prisma-client-js: Optimize Photon's size

Created on 8 Jan 2020  路  3Comments  路  Source: prisma/prisma-client-js

Just adding Photon with no other deps leads to bundle size of >50 mb which is rejected by AWS Lambda.

This issue tracks making Photon's size smaller.

This can also be seen on npm's package list

image

This size does not include binaries, with them, the bundle is already ~90mb.

kinimprovement

Most helpful comment

Thanks a lot for reporting 馃檹
This issue is fixed in the latest version of prisma2.
You can try it out with npm i -g prisma2.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

All 3 comments

I only installed production deps but it still included prisma2, maybe photon has a dep on that.

I could deploy my bundle by manually removing node_modules/prisma2, maybe that is a low handing fruit.

We already have an issue that tracks the removal of Typescript from Photon, which will take care of 99% of that: https://github.com/prisma/photonjs/issues/391

(Internal board: https://www.notion.so/prismaio/31c5ed0b93924f778da033c0f6508bb1?v=f2ffe96c9e5d4a5ea086108705a0ea35&p=5f20ef73b45e41c8a788f6e6c5aefb70)

Thanks a lot for reporting 馃檹
This issue is fixed in the latest version of prisma2.
You can try it out with npm i -g prisma2.

In case it鈥檚 not fixed for you - please let us know and we鈥檒l reopen this issue!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AhmedElywa picture AhmedElywa  路  4Comments

emroot picture emroot  路  4Comments

mrmntte picture mrmntte  路  3Comments

MichalLytek picture MichalLytek  路  3Comments

divyenduz picture divyenduz  路  3Comments