diff --git a/src/index.ts b/src/index.ts index 10fcb5e7..a249ce58 100644 --- a/src/index.ts +++ b/src/index.ts @@ -131,7 +131,7 @@ export class TypeScriptPlugin { this.serverless.cli.log(`Watching typescript files...`) this.isWatching = true - watchFiles(this.rootFileNames, this.originalServicePath, this.compileTs) + watchFiles(this.rootFileNames, this.originalServicePath, this.compileTs.bind(this)) } async compileTs(): Promise {