Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phoenix741 opened this issue Jun 28, 2024 · 0 comments · May be fixed by #99
Open

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

phoenix741 opened this issue Jun 28, 2024 · 0 comments · May be fixed by #99

Comments

@phoenix741
Copy link

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 phoenix741 linked a pull request Jun 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant