Skip to content

Commit

Permalink
🐛 function package individually can't find the compiled js
Browse files Browse the repository at this point in the history
  • Loading branch information
zjye-idealhub committed Apr 30, 2019
1 parent c702a57 commit 814f391
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,18 @@ export class TypeScriptPlugin {
serverlessFolder,
path.basename(this.serverless.service.package.artifact)
)

this.serverless.service.getAllFunctions().forEach(name => {
if (this.serverless.service.functions[name].package.artifact) {
this.serverless.service.functions[name].package.artifact = path.join(
this.originalServicePath,
serverlessFolder,
path.basename(
this.serverless.service.functions[name].package.artifact
)
)
}
})
}

async cleanup(): Promise<void> {
Expand Down

0 comments on commit 814f391

Please sign in to comment.