You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In s-function.json you did specify the function root (i.e. the folder where your node_modules for the functions are found) as the function folder itself ("handler": "handler.handler").
I think all paths you specify in the optimize section are relative to this.
Try to set your handler as "handler": "functionname/handler.handler", so that api becomes your function root (magic handlers). Then you should be able to specify just lib in the includePaths array.
BTW: the packages used by your functions should also be in the function root (i.e. create the package.json for your lambda functions in the api directory).
@HyperBrain if i will use magic handler then all functions parallel functionname function will be added functionname funtion zip file,i dont want to add all other functions with functionname function zip
I don't think so, as this is exactly what the optimizer plugin does: it removes the not used modules. You can check that in _meta/tmp/functionXXX@XXXXXX/optimized or in the zip file.
Activity
HyperBrain commentedon Apr 27, 2016
In
s-function.jsonyou did specify the function root (i.e. the folder where your node_modules for the functions are found) as the function folder itself ("handler": "handler.handler").I think all paths you specify in the optimize section are relative to this.
Try to set your handler as
"handler": "functionname/handler.handler", so thatapibecomes your function root (magic handlers). Then you should be able to specify justlibin the includePaths array.BTW: the packages used by your functions should also be in the function root (i.e. create the
package.jsonfor your lambda functions in theapidirectory).nirmalgoswami commentedon Apr 27, 2016
@HyperBrain if i will use magic handler then all functions parallel
functionnamefunction will be added functionname funtion zip file,i dont want to add all other functions withfunctionnamefunction zipnirmalgoswami commentedon Apr 27, 2016
@HyperBrain
i mean
functiontwoandfunctionthreewill be added functioname zip fileHyperBrain commentedon Apr 27, 2016
I don't think so, as this is exactly what the optimizer plugin does: it removes the not used modules. You can check that in
_meta/tmp/functionXXX@XXXXXX/optimizedor in the zip file.nirmalgoswami commentedon Apr 27, 2016
@HyperBrain oh god,i was missing this 👍 ,i thought all folder with
optimizedfolder will be deploy to aws lambda,Thanks for infoYou are real contributor of serverless !!!! 👍
again Thank you so much.