stefano
stefano9mo ago

Helpers bundling

I have a helpers.ts file where I store some plain helper functions which I import and use throughout my Convex functions.
export async function myHelperFunction()
export async function myHelperFunction()
this file is getting big, 1k+ lines and counting. Is there any performance consideration on importing functions from a file like this?
1 Reply
ballingt
ballingt9mo ago
No, the bundle size of submitted functions shouldn't be an issue with ~1000 lines. First it'll be tree-shaken, so only utils you need will be in the endpoint bundle. But second, the limit in backed function size is significant, 32MB. People only reach it by using big dependencies, you'd need hundreds of thousands of lines of code to hit this with code you're writing yourself.

Did you find this page helpful?