Skip to content

Commit 36f0a05

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 5a9deeb commit 36f0a05

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
@@ -40,7 +40,6 @@ pub(crate) async fn execute_check(
4040
let has_paths = !paths.is_empty();
4141
let mut fmt_fix_started: Option<Instant> = None;
4242
let mut deferred_lint_pass: Option<(String, String)> = None;
43-
let resolved_vite_config = resolver.resolve_universal_vite_config().await?;
4443

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

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

0 commit comments

Comments
 (0)