Skip to content

Commit 2832a59

Browse files
authored
Invoke TS compiler before starting REPL prompt (#1498)
1 parent dd4c04e commit 2832a59

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
@@ -330,6 +330,11 @@ export function createRepl(options: CreateReplOptions = {}) {
330330
}
331331
}
332332

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

0 commit comments

Comments
 (0)