Skip to content

Commit

Permalink
fix windows paths with --root (vercel#3281)
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Jan 12, 2023
1 parent 4e6ea8f commit b39fc85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/next-dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ async fn source(
let project_relative = project_dir.strip_prefix(&root_dir).unwrap();
let project_relative = project_relative
.strip_prefix(MAIN_SEPARATOR)
.unwrap_or(project_relative);
let project_path = fs.root().join(project_relative);
.unwrap_or(project_relative)
.replace(MAIN_SEPARATOR, "/");
let project_path = fs.root().join(&project_relative);

let env = load_env(project_path);
let build_output_root = output_fs.root().join(".next/build");
Expand Down

0 comments on commit b39fc85

Please sign in to comment.