serverless-optimizer-plugin icon indicating copy to clipboard operation
serverless-optimizer-plugin copied to clipboard

Another includePaths bug

Open srg-clearlaunch opened this issue 8 years ago • 1 comments

Hi - Isn't this a bug in the includePaths? https://github.com/serverless/serverless-optimizer-plugin/blob/master/index.js#L288

Shouldn't it be something like:

let destDir  = (fs.lstatSync(path.join(_this.evt.options.pathDist,p)).isDirectory()) ? destPath : path.dirname(destPath);

That way optimizer will actually find the intended include? If you just use the includePath as written in the s-function then lstat won't find it because its looking for a full path right? (http://linux.die.net/man/2/lstat)

Changing to the above allows a successful deploy for me

srg-clearlaunch avatar Jun 30 '16 20:06 srg-clearlaunch