Typescript, custom src path in order to use invoke local -f

lambda

#1

Hello,
I’m using Typescript with Serverless.
I’ve tried several Typescript plugins for Serverless but all of them create a very heavy build.
( I have a quite high amount of functions )

With the Webpack plugin, the development process in local is just too slow, if you want to test locally a function, every time, you have to wait for the Webpack build ( which is quite slow ).

I’ve made a custom ‘deploy’ script

It works with charm with ‘sls deploy’ and ‘serverless deploy ${funcionName}’.
The average size reduction of the final build is about 50%, it also allows me to use “tsc -w” in local.
The only problem…I’m not able to use “sls invoke local”.

There is any way to set a different src folder in the serverless.yml ?

I guess that if I’ll point Serverless to the dist folder instead of to the real src folder it should work.

I wasn’t able to find anything on the official doc.

Could someone drive me to the right doc section?

Thank you so much.
Sorry about my English.