There is a major pain I’m trying to think how to handle.
I have a layer that injects some common nodejs modules. This layer is attached to some lambda I have. Now when I write my lambda code that relies on that package, I also import the package at the top of the file.
What happens then is that Pulumi attempts to bundle that package into my lambda code, even tho the only reason I have it installed is so I can create a layer with this module. How can we tell Pulumi not to bundle this package?
Also, Pulumi does not respect tree-shaking and bundles the entire package even if I’m using a subset of the package. Is my only option here is to pipe my code through a more “intelligent” such as webpack to do the tree-shaking for me?