Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Source maps for included modules? #134

Open
chajath opened this issue Aug 8, 2017 · 3 comments
Open

Source maps for included modules? #134

chajath opened this issue Aug 8, 2017 · 3 comments

Comments

@chajath
Copy link

chajath commented Aug 8, 2017

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?

@ChadLefort
Copy link

ChadLefort commented Oct 7, 2017

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.

@steranka
Copy link

steranka commented Apr 26, 2018

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.

@ivan114
Copy link

ivan114 commented Jul 18, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants