serverless / serverless-optimizer-plugin

Serverless Optimizer Plugin: Optimizers for reducing Lambda file sizes and improving their performance -
http://www.serverless.com
102 stars 30 forks source link

IncludePaths doesn't support parent directory #29

Open ghost opened 8 years ago

ghost commented 8 years ago

Some nodejs modules doesn't compatible with optimizer, so I need to exclude the module in the exclude prop and take some includePaths directly.

The problem is that, the node_modules folder is in the root of project, my function is in the path of functions_group/functions/myfunction and handler config like functions/myfunction/handler.handler. Now I want to include specific module in node_modules, but includePaths did not support parent directory like "../parentDir".

I made a dirty hack with adding a new prop 'includeModules' to copy the specific module to the optimizer path, but I think it is not perfect.

Any ideas of this?

nirmalgoswami commented 8 years ago

can you please check this one https://github.com/serverless/serverless-optimizer-plugin/issues/48

this is related to yours