Skip to content

Commit

Permalink
fix: file excluding
Browse files Browse the repository at this point in the history
  • Loading branch information
yanaSelin authored and sergioramos committed Oct 13, 2020
1 parent b286741 commit a32218f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ module.exports = class {
this.serverless.cli.log(message);
});

const patterns = excludes
.map((p) => (p.charAt(0) === '!' ? p.substring(1) : `!${p}`))
.concat(includes)
.concat(fileList);
// Order is important, otherwise exclude flags will be overwritten
const patterns = includes
.concat(fileList)
.concat(excludes.map((p) => (p.charAt(0) === '!' ? p.substring(1) : `!${p}`)));

const allFilePaths = await Globby(patterns, {
cwd: this.servicePath,
Expand Down

0 comments on commit a32218f

Please sign in to comment.