Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke TS compiler before starting REPL prompt #1498

Merged
merged 1 commit into from
Nov 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,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