includeDependencies.always does not work
BartusZak opened this issue · 1 comments
BartusZak commented
service: users-service-${self:custom.clientName}
package:
individually: true # Create an optimized package for our functions
excludeDevDependencies: false
include:
- "../libs/**" # Adds shared extensions <-- WORKS
# # - "../node_modules/@middy/**"
# # - "../node_modules/lambda-log/**"
# # - "../node_modules/aws-sdk/**"
# # - "../node_modules/aws-xray-sdk/**"
plugins:
- serverless-dynamodb-local # Development
- serverless-offline # Development
- serverless-deployment-bucket # Create and configure the custom Serverless deployment bucket.
- serverless-iam-roles-per-function # Define IAM roles per function
- serverless-plugin-include-dependencies
# Load serverless.common.yml
custom: ${file(../serverless.common.yml):custom} <-- custom from serverless.common.yml file
serverless.common.yml
custom:
includeDependencies:
always:
- "libs/**"
Structure:
| - libs/
| -- dynamodb/
| --- adapter.js
| -- aws-sdk.js
|
| - users-service/
| -- serverless.yml
|
| - serverless.common.yml
There is no error. includeDependencies.always
does not include directory. Native package.include
works.
I check that by running serverless package
BartusZak commented
False alarm.
I had to declare relative path for serverless.yml
file (not serverless.common.yml
)
custom:
includeDependencies:
always:
- "../libs/**"