Deploy Firebase functions separately from eachother, code being encapsulated for each function

I have a Firebase project that has started to grow in amount of functions. My functions folder looks something like:

|--/lib (compiled to js)
|--index.ts (exports each function )

The problem I'm facing, is that the same code is deployed for each function. So for this example, I have 4 functions.They run without a problem.But when deployed, each one contains the code for all other functions as well, not just the one they use. This makes deployed take a long time and it's messy as well.

I would like a way to maybe split them into separate folders that deploy individually and contain only the code they require. Would something like this be possible?