tslog icon indicating copy to clipboard operation
tslog copied to clipboard

Bug: Browser logs do not show correct source location, and stack print is not clickable

Open armincerf opened this issue 2 years ago • 0 comments

Describe the bug

When running the example in the docs here I get the following output in the browser:

image

To Reproduce

  1. Start a new vite project (yarn create vite vite-app)
  2. Add "inlineSourceMap": true, to tsconfig as stated in docs
  3. copy example from here into main.tsx
  4. non error logs show /node_modules/.vite/deps/tslog.js:864 as code location
  5. error log correctly shows /src/main.tsx:20 but clicking this simply opens a new tab as if that were a URL, it is not a link to a source file

Expected behavior

All log methods should show the file with correct line number where the log was triggered

Clicking that link should show the source mapped file in the browser inspector

Node.js Version v17.9.1

OS incl. Version macOS 13.1

armincerf avatar Mar 06 '23 22:03 armincerf