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.
Some nodejs modules doesn't compatible with optimizer, so I need to exclude the module in the
exclude
prop and take someincludePaths
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 likefunctions/myfunction/handler.handler
. Now I want to include specific module innode_modules
, butincludePaths
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?