mirror of
https://github.com/TanStack/devtools.git
synced 2026-11-16 10:49:48 +00:00
fix(devtools-bundler-core): open source files outside cwd and end bad open-source requests (#541)
addSourceToJsx strips cwd from the module path. A file outside cwd (a monorepo package, or Vite run from another directory) keeps its absolute path, and the open-source handler then prefixed cwd again. The editor got paths like /repo/apps/web/repo/packages/pkg/src/panel.tsx. The handler now uses the absolute path when the cwd-relative file does not exist and the absolute one does. A missing or malformed `source` returned without ending the response, so the request stayed pending until the browser timed out. It now answers 400. Fixes #281 Fixes #176 Refs #451
This commit is contained in:
parent
012421fcc3
commit
df1464cdca
3 changed files with 45 additions and 15 deletions
Loading…
Add table
Add a link
Reference in a new issue