So I’m trying to stop using webpack to compile my typescript and to package files i need to for my AWS Lambda function. Got the typescript compile working great. However, I can’t seem to get the necessary files.
Here’s snippet of my yml file.
package:
patterns:
- config/**
- content/**
It is placed above the functions: section and below the provider section as shown in the demo. However, when I run the CLI “serverless package” command and examine the contents of the zip file neither the config nor the content directories appear in the zip file. nor are the static files themselves in the zip file anyplace.
So…apparently the “patterns” aren’t ready for prime-time despite the nag being generated by the CLI. reverted back to include/exclude and everything worked as i would expect.
Using version 2.45.1, Node 12.16.1.
Having the exact same issue… i was even kinda confronted by a developer on the project assuring me that everything worked perfectly. Which after 2 hours of messing around… it works for 1 folder that is external to my src directory. (by only adding the folder’s name). but adding anything with a “glob” will not work. i’m trying to add a folder from my src directory that is not compiled (html files) and there is no way to make it work, i tried:
src/templates
src/templates/**
src/templates/**/*
src/templates/**/**
src/templates/**/**/*
nothing works. So i’m back to saying like you did @3boysdad… this is not ready to be replacing the “old” exclude/include system. that old pattern works perfectly and now replaced by something that does not work.