Skip to content

Commit 677e8bb

Browse files
committed
Invoke TS compiler before starting REPL prompt
1 parent 6e6bf63 commit 677e8bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/repl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ export function createRepl(options: CreateReplOptions = {}) {
329329
}
330330
}
331331

332+
// In case the typescript compiler hasn't compiled anything yet,
333+
// make it run though compilation at least one time before
334+
// the REPL starts for a snappier user experience on startup.
335+
service?.compile('', state.path);
336+
332337
const repl = nodeReplStart({
333338
prompt: '> ',
334339
input: replService.stdin,

0 commit comments

Comments
 (0)