serverless-plugin-include-dependencies icon indicating copy to clipboard operation
serverless-plugin-include-dependencies copied to clipboard

serverless-plugin-common-excludes not working when individually == true

Open phoenix741 opened this issue 7 months ago • 0 comments

Hi,

I have a serverless.yml where i set some file to remove and to keep:

package:
  individually: true
  excludeDevDependencies: false
  patterns:
    - '!./**'
    - '!node_modules/@aws-sdk/**/dist-es/**'
    - '!node_modules/@aws-sdk/**/dist-types/**'
    - '!node_modules/@smithy/**/dist-es/**'
    - '!node_modules/@smithy/**/dist-types/**'
    - ./config/**


functions:
  resources:
    name: lambda-${self:service}-${self:provider.stage}-resources
    handler: dist/apps/resources/main.handler
    events:
      - http:
          method: GET
          path: '/api/resources/cities'
    package:
      patterns:
        - ./dist/apps/resources/**

The file added globally are correctly added, the file excluded in node_module aren't excluded and in the plugin serverless-common-exclude is useless.

If i set individually to false, i have only one zip and the exclusion works (but then lambda is too big)

phoenix741 avatar Jun 28 '24 15:06 phoenix741