Adhere to Serverless.yml exclude list by QAnders · Pull Request #13097 · serverless/serverless
Solves #12379
Issue is that Docker runs as root and adds persistence directories as owner root and globby throws as it has no access. The code is set to fail silently why it just skips excludes and includes all devDependencies as well in final package.
My suggested code will take the package.patterns list and exclude any excluded patterns from the globby reading.
Hence, if I exclude the Docker persistence directories in package.patterns they will not be read by globby and I will get a proper zip with excluded devDependencies.
Closes: #{ISSUE_NUMBER}