serverless-package-common icon indicating copy to clipboard operation
serverless-package-common copied to clipboard

can we exlcude specific files from mentioned source directory?

Open jagadish432 opened this issue 5 years ago • 1 comments

I have a common folder containing shared files, now I gave the path to this common folder in the 'source' section, and in the destination section of 'packageCopyCommon' I gave some required path like 'src/common/' so that my lambda handler can easily access these shared files.

Now, I want to exclude some of the files in the common folder before copying to the destination path, is that possible ?? is there any way to do that ??

jagadish432 avatar Nov 20 '20 14:11 jagadish432

At function level you can exclude them, but I would like to do it while packaging. What I did is:

functions:
  func1:
    package:
      patterns:
        - '!your_new_external_package/README.md'

norayr-im avatar Dec 21 '22 06:12 norayr-im