Skip to content

Commit 74af10d

Browse files
committed
updated for easier in editor opening
1 parent 7d31353 commit 74af10d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-router-devtools",
33
"description": "Devtools for React Router - debug, trace, find hydration errors, catch bugs and inspect server/client data with react-router-devtools",
44
"author": "Alem Tuzlak",
5-
"version": "5.0.2",
5+
"version": "5.0.3",
66
"license": "MIT",
77
"keywords": [
88
"react-router",

src/vite/plugin.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
370370
}
371371

372372
const column = line.indexOf("console.")
373-
const logMessage = `'${chalk.magenta("LOG")} ${chalk.blueBright(`http://localhost:${port}/open-source?source=${encodeURIComponent(id.replace(normalizePath(process.cwd()), ""))}&line=${lineNumber + 1}&column=${column + 1}`)}\\n → '`
373+
const location = `${id.replace(normalizePath(process.cwd()), "")}:${lineNumber + 1}:${column + 1}`
374+
const logMessage = `'${chalk.magenta("LOG")} ${chalk.blueBright(`${location} - http://localhost:${port}/open-source?source=${encodeURIComponent(id.replace(normalizePath(process.cwd()), ""))}&line=${lineNumber + 1}&column=${column + 1}`)}\\n → '`
374375
if (line.includes("console.log(")) {
375376
const newLine = `console.log(${logMessage},`
376377
return line.replace("console.log(", newLine)

0 commit comments

Comments
 (0)