nitrictech / legacy-cli

CLI for the Nitric Framework
Apache License 2.0
6 stars 1 forks source link

do tree shaking as part of container build (feature request) #250

Closed shaf-h closed 2 years ago

shaf-h commented 2 years ago

Some of my functions use pretty big modules (e.g. puppeteer, pdf gen, image manipulation). It would be useful to exclude them from the function containers that don't need them.

asalkeld commented 2 years ago

you can currently use "excludes" to remove files from the build.

functions:
  create:
    handler: functions/create.ts
    excludes:
      - afile
      - anotherflie

Does this help or are you wanting some other behaviour?

shaf-h commented 2 years ago

Great, that should do the trick. Thanks mate!