diff --git a/index.js b/index.js index 9aa2856..233784b 100644 --- a/index.js +++ b/index.js @@ -150,7 +150,8 @@ module.exports = class Plugin { this.serverless.service.functions[name].handler = binPath; const packageConfig = this.generatePackageConfig(runtime, config, binPath); - if (this.serverless.service.functions[name].package) { + if (this.serverless.service.functions[name].package + && this.serverless.service.functions[name].package.include) { packageConfig.include = packageConfig.include.concat( this.serverless.service.functions[name].package.include );