Skip to content

Commit c7f053c

Browse files
committed
fix: fallback to compile-time vp path when remap misses
1 parent ffb9d24 commit c7f053c

File tree

1 file changed

+3
-1
lines changed
  • crates/vite_task_bin/tests/e2e_snapshots

1 file changed

+3
-1
lines changed

crates/vite_task_bin/tests/e2e_snapshots/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ fn resolve_runtime_vp_path() -> AbsolutePathBuf {
111111

112112
let runtime_manifest = runtime_manifest_dir();
113113
let runtime_vp = runtime_manifest.join(vp_relative_path);
114-
AbsolutePathBuf::new(runtime_vp).unwrap()
114+
let resolved_vp = if runtime_vp.exists() { runtime_vp } else { compile_time_vp.to_path_buf() };
115+
let resolved_vp = resolved_vp.canonicalize().unwrap_or(resolved_vp);
116+
AbsolutePathBuf::new(resolved_vp).unwrap()
115117
}
116118

117119
const fn default_true() -> bool {

0 commit comments

Comments
 (0)