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

curved-pharmacist-41509

12/16/2019, 10:29 PM
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

white-balloon-205

12/17/2019, 12:26 AM
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.
23 Views