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

[BUG] Serverless exclude sections are not working as expected #18

Closed
wickstargazer opened this issue May 29, 2020 · 7 comments
Closed

Comments

@wickstargazer
Copy link
Member

Describe the bug

service: hello-world
frameworkVersion: ">=1.1.0 <2.0.0"
plugins:
  - serverless-offline
package:
  individually: true
  excludeDevDependencies: true
  exclude:
    - src/**
  include:
    - src/function/handler.js
  custom:
    enable_optimize:
      local: false
provider:
  name: aws
  runtime: nodejs12.x
  stage: ${opt:stage, 'dev'}
functions:
  config:
    handler: src/handler.hello

the exclude is not getting excluded

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Check which provider is affected:
[x] AWS
[] Azure
[] Google Cloud Platform

Check which framework is affected:
[] Angular
[] Nodejs
[x] Serverless
[] Lambda
[] Infrastructure as a code

Additional context
Add any other context about the problem here.

@wickstargazer
Copy link
Member Author

What behavior should it have when the exclude and handler is overlapping? lets say someone by mistake wants to exclude src/handler.hello while still have it in the section like below?

functions:
  config:
    handler: src/handler.hello

@sonicparke
Copy link

What behavior should it have when the exclude and handler is overlapping? lets say someone by mistake wants to exclude src/handler.hello while still have it in the section like below?

functions:
  config:
    handler: src/handler.hello

Maybe a warning on build that says you are excluding the function you're trying to build?

@wickstargazer
Copy link
Member Author

@sonicparke Thankz for the feedback, now it is fixed in version 0.5.0
It will throw a warning, actually excludes it and if no handler is left throws an error
Will keep this open until we tested it out! 😄

@wickstargazer
Copy link
Member Author

Hi @sonicparke did you get this to work with your case? Please dont hestiate to leave any mis-endavours that i can be of help with

@wickstargazer
Copy link
Member Author

@sonicparke shall i close this for now?

@sonicparke
Copy link

@wickstargazer Yes. Sorry for the late reply. I got sidetracked. :-)

@sonicparke
Copy link

@wickstargazer Things seem to be working fine. I'll definitely let you know if there are any issues. Thanks for the hard work!!

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

No branches or pull requests

2 participants