Skip to content

Commit

Permalink
Invoke TS compiler before starting REPL prompt (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUnlocked authored Nov 7, 2021
1 parent dd4c04e commit 2832a59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ export function createRepl(options: CreateReplOptions = {}) {
}
}

// In case the typescript compiler hasn't compiled anything yet,
// make it run though compilation at least one time before
// the REPL starts for a snappier user experience on startup.
service?.compile('', state.path);

const repl = nodeReplStart({
prompt: '> ',
input: replService.stdin,
Expand Down

0 comments on commit 2832a59

Please sign in to comment.