2

EDIT: Source Map works in Firefox, but not in Chrome or Edge.

When I'm debugging warnings/errors, I click on the TSX file and it pulls up an obfuscated version of the .ts/tsx file. The following screenshots will help clarify my issue...

When I get a React error like this enter image description here

I click on the /components/AddObject/index.tsx link and it opens the file in the console, but it looks like this

enter image description here

Here's what my webpack config looks like (using devTool: 'eval-source-map')

enter image description here

Any thoughts as to why my source-map file is behaving this way?

5
  • 1
    Does this answer your question? Debugging typescript with source maps and webpack Commented Jul 15, 2021 at 17:14
  • Eh. Unfortunately, no, still no luck :( Commented Jul 15, 2021 at 19:31
  • you can also enable source-map in tsconfig.json. This works for me in my backend. More info here: code.visualstudio.com/docs/typescript/typescript-compiling Commented Jul 15, 2021 at 21:17
  • Hmm. No, still no luck. I just added an edit - source map works in Firefox, but not in Chrome or Edge. I guess I need to go back to the drawing board. Commented Jul 16, 2021 at 0:10
  • did you try with simply eval ? Commented May 5, 2022 at 18:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.