create-react-app-typescript icon indicating copy to clipboard operation
create-react-app-typescript copied to clipboard

Source maps for included modules?

Open chajath opened this issue 8 years ago • 3 comments

I am developing a module to be used with react, and I've bootstrapped my example project with react-scripts-ts.

I found that in order to source map the referenced module from the example, currently I can't help but ejecting the project, since the source maps target is hardwired to be the source directory of the project only (https://github.com/wmonk/create-react-app-typescript/blob/master/packages/react-scripts/config/webpack.config.dev.js#L151). That may suit for the most cases, but there are cases where it would be more beneficial to have source maps from node modules ready at hand for debugging purpose.

Would it make sense to provide a way to customize what gets to have source map loaded?

chajath avatar Aug 08 '17 04:08 chajath

I believe I'm also currently running into this issue.

We have recently split some of our code base into npm packages. When using yarn link or npm link local development is fine except we have no way of debugging the typescript files since none of the source maps are being loaded.

ChadLefort avatar Oct 07 '17 01:10 ChadLefort

I believe the debugger source maps that are generated (or loaded) are not correct when I run "npm start".
When I view source, the breakpoints don't show up in the correct places.

I'm running the chromium-browser v61.0, react-scripts-ts v2.15.1, node v8.2.1. I'm using vscode but not trying to connect/debug "from vscode", I'm simply using the normal chrome javascript debugger. I've done create-react-app's and they have worked OK in this configuration so my belief is that I would want to change the type of source map generated. Any suggestions on the files to change to do this are appreciated.

steranka avatar Apr 26 '18 02:04 steranka

I am facing the same issues, my packages linked using yarn link have no source maps loaded. Tried using react-app-rewired to modify webpack config but not success. Any solution or work around can due with this? I need it so much. Any suggestions are appreciated.

ivan114 avatar Jul 18 '18 01:07 ivan114