Skip to content

Commit 5a9a602

Browse files
committed
perf(check): defer resolve_universal_vite_config to the lint branch
The resolved config is now only consumed by LintMessageKind, so calling the JS-runtime resolver unconditionally wasted a NAPI round-trip on `vp check --no-lint` and fmt-only paths.
1 parent e94193d commit 5a9a602

File tree

1 file changed

+1
-1
lines changed
  • packages/cli/binding/src/check

1 file changed

+1
-1
lines changed

packages/cli/binding/src/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pub(crate) async fn execute_check(
3939
let has_paths = !paths.is_empty();
4040
let mut fmt_fix_started: Option<Instant> = None;
4141
let mut deferred_lint_pass: Option<(String, String)> = None;
42-
let resolved_vite_config = resolver.resolve_universal_vite_config().await?;
4342

4443
if !no_fmt {
4544
let mut args = if fix { vec![] } else { vec!["--check".to_string()] };
@@ -114,6 +113,7 @@ pub(crate) async fn execute_check(
114113
}
115114

116115
if !no_lint {
116+
let resolved_vite_config = resolver.resolve_universal_vite_config().await?;
117117
let lint_message_kind =
118118
LintMessageKind::from_lint_config(resolved_vite_config.lint.as_ref());
119119
let mut args = Vec::new();

0 commit comments

Comments
 (0)