Comments (7)
Done! Now it's setting excludeDevDependencies = false
automatically.
Thank you for the suggestion!
https://github.com/agutoli/serverless-layers/blob/master/src/index.js#L166
from serverless-layers.
Hi, @enapupe. I appreciate your message.
So, yeah. I can not use "the existing node_modules" to create AWS lambda layers, that's because it has dev dependencies as well (which is not necessary to be uploaded). So I really need to "ignore" existing node_modules, that's is correct and expected.
Therefore, customInstallationCommand
is necessary for some cases who's someone needs to install a "production" package and your environment uses a proxy or a custom install command (again, this plugin ignores your node_modules).
About config bellow, it's because you can ignore your existing node_modules which will not be used by serverless-layers when packing your project, so your package should be drastically smaller if compared when you remove this config:
package:
individually: false
exclude:
- node_modules/**
excludeDevDependencies: true
Stil about "I was able to save 10+ seconds setting this flag to false", I will investigate better ". Thanks again.
from serverless-layers.
Sorry if I wasn't clear enough.
My assumption is: if the layer is being generated by customInstallationCommand and node_modules is package ignored, there is no point in spending time separating what's devDeps and what not, which seems to be what that flag is doing.
FWIW I have set the flag to false and it did not affect uploaded files, while it saved package time.
Hope that clears my question. Thanks for your time have a good weekend.
from serverless-layers.
Oh.. ok, yes. You probably right. I will remove it from README. This excludeDevDependencies
is a good option when is not using serverless-layers
.
thanks for raising that point!
from serverless-layers.
I see you have just changed how this was working and thus removed it from the readme, which makes sense.
However, it seems you should automatically set excludeDevDependencies: false
as it default to true and it's pointless - as discussed
from serverless-layers.
Cool. I can do that. Just add one line at:
https://github.com/agutoli/serverless-layers/blob/master/src/index.js#L161
from serverless-layers.
Thanks for your contribution.
from serverless-layers.
Related Issues (20)
- Error when deploying through Azure Pipeline Worker - ENOENT Error HOT 1
- Unzipped size must be smaller than 262144000 bytes HOT 4
- Layer version not updated when using provision concurency HOT 1
- Command failed: yarn --production HOT 3
- Wrong layer is used HOT 6
- Release new version?
- Not able to detect change in package.json
- Possible to works with workspaces ?
- Python 3.10 and 3.11 support
- Mysteriously increased my layers deployment
- npm warnings for --only=prod
- excluding "aws-dk" broken the build HOT 2
- Python Layers using other layers packages HOT 3
- Is there a way to combine 2 package.json for a single function?
- Hello, can you support runtime: provided.al2023
- node_modules not included in layers HOT 7
- package.json file is not actually copied over in WSL2 HOT 1
- copyProjectFile should NOT call init() every time
- Bug in version 2.8.5 HOT 2
- "Could not find API configuration lambda-2015-03-31" in v2.8.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-layers.