Does Pulumi work if you split index.ts into multip...
# typescript
c
Does Pulumi work if you split index.ts into multiple modules? I'm having issues with a lambda I have moved into another module and the modules it await import() internally are not included in the zip.
w
Does Pulumi work if you split index.ts into multiple modules?
Yes - though of course you then have to import those modules into your
index.ts
(standard Node.js loader rules).
the modules it await import() internally are not included in the zip.
If you are dynamically loading something, you will in general need to use
extraIncludePaths
and/or
extraIncludePackages
. This is about what get's packaged into a Lambda, not really about what gets run by Pulumi at deployment time. See https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/pulumi/runtime/closure/#CodePathOptions-extraIncludePackages.