https://pulumi.com logo
#typescript
Title
# typescript
w

wooden-lighter-66320

05/13/2020, 10:23 PM
Has anybody looked into figuring out ways to prevent Pulumi from including the entire node_modules directory when generating a lambda method? That seems pretty wasteful, the serialization of the method itself appears to work great but I'm seeing tons of unused code in our deploy bundles that doesn't feel like it needs to be there.
f

faint-table-42725

05/13/2020, 10:53 PM
The serialization attempts to compute what packages are needed (see https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/runtime/closure/codePaths.ts#L85) so it shouldn’t normally include everything in
node_modules
The docstring a few lines above what I linked provides some context
w

wooden-lighter-66320

05/14/2020, 8:37 PM
Thanks much!