-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add the ability to exclude some files from the package #488
Conversation
@jaydp17 do you mind correcting the merge conflicts outlined above? We're working our way through the backlog of pull requests. Thanks! |
Can it be that this functionality is quite dangerous? Currently webpack completely controls what is packaged, i.e. what is used is packaged. Interfering with that might render broken deployments, e.g. if you use the json-loader (which you should when using json files) and forget to include the json files. |
@HyperBrain this won't interfere with webpack at all, as this runs after webpack has finished building. @designfrontier give me some time, I'll resolve the merge conflicts. @hassankhan, However, I'm open to suggestions, if |
I agree that
|
to allow users to select which files should be included in the package By default it includes all built assets
32c1556
to
db50548
Compare
We do have an option Can this solve your problem? |
What did you implement:
Closes #470
It allows the user to include only a subset of files in the package.
For example, it's very handy to exclude sourcemaps from the package.
How did you implement it:
☝️this is how we use it.
We were already using glob package and passing
**
to include all files, this PR just makes that input to glob package as a configurable value fromserverless.yml
.If not set in
serverless.yml
it defaults to**
, including all files.How can we verify it:
sls package
.serverless
and verify that.js.map
files are not included in the packageTodos:
Is this ready for review?: YES
Is it a breaking change?: NO