Skip to content

Commit 111a410

Browse files
committed
feat: Support packaging functions individually (closes #42 #107)
1 parent c702a57 commit 111a410

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: src/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@ export class TypeScriptPlugin {
202202
serverlessFolder,
203203
path.basename(this.serverless.service.package.artifact)
204204
)
205+
206+
this.serverless.service.getAllFunctions().forEach(name => {
207+
if (this.serverless.service.functions[name].package.artifact) {
208+
this.serverless.service.functions[name].package.artifact = path.join(
209+
this.originalServicePath,
210+
serverlessFolder,
211+
path.basename(
212+
this.serverless.service.functions[name].package.artifact
213+
)
214+
)
215+
}
216+
})
205217
}
206218

207219
async cleanup(): Promise<void> {

0 commit comments

Comments
 (0)