Skip to content

Commit 650de0f

Browse files
committed
disable excludeDevDependencies by default
1 parent cd18aa3 commit 650de0f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 0.1.4 (unreleased)
22

33
* bump lambda rust docker version to 0.1.0-rust-1.27.2
4+
* speed up deployments by ~3.2 seconds by disabling excludeDevDependencies. it's on by default but it's not useful for for Rust focused services
45

56
# 0.1.3
67

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
// https://serverless.com/blog/writing-serverless-plugins/
4+
// https://serverless.com/framework/docs/providers/aws/guide/plugins/
45

56
const { spawnSync } = require('child_process');
67
const { removeSync } = require('fs-extra');
@@ -26,6 +27,14 @@ class ServerlessPlugin {
2627
},
2728
this.serverless.service.custom && this.serverless.service.custom.rust || {}
2829
);
30+
31+
// By default, Serverless examines node_modules to figure out which
32+
// packages there are from dependencies versus devDependencies of a
33+
// package. While there will always be a node_modules due to Serverless
34+
// and this plugin being installed, it will be excluded anyway.
35+
// Therefore, the filtering can be disabled to speed up (~3.2s) the process.
36+
this.serverless.service.package.excludeDevDependencies = false;
37+
2938
this.artifacts = [];
3039
}
3140

0 commit comments

Comments
 (0)