How to get correct links to source files in DevTools profiler in Create React App?

Viewed 1071

I've created a basic Create React App with TypeScript template

npx create-react-app cra-test --template typescript

I added just a simple MyButton component and passed a on click handler to it. When I'm profiling it with Chrome DevTools links to the source in the profiler are incorrect and not working as if there where no source maps.

When I run console.trace in my onClick handler stack trace looks good.

How can I get correct links to source files in the profiler tab working?

Thanks!

profiler with wrong source file links as if there was no source map

stack trace made with console.trace that shows proper source file names

1 Answers
Related