next.js
5321ba84 - [segment explorer] normalize path when running inside monorepo (#82146)

Commit
278 days ago
[segment explorer] normalize path when running inside monorepo (#82146) When you running `pnpm next <project path>` from the monorepo root with turbopack and the `<project path>` is not same as your root directory, this lead the unrelated paths outside of the next.js project are also included into the segment explorer file paths. Because in turbopack the current directory is changed to `[project]` after bundling so that we didn't get the correct relative path when running segment explorer. The absolute path is formatted as `<project-root>/<cwd>`, and the `<project root>` will be included into the path if the working directory is not same as the next.js directory. The PR fixes the issue by extracting the `<project-root>` from the absolute path, and also stripped from the segment explorer paths. Closes NEXT-4651
Author
Parents
Loading