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

Problems with source maps on a simple create ... npm start.

Open richtera opened this issue 8 years ago • 3 comments

Is this a bug report?

Either a bug or something I am missing.

Did you try recovering your dependencies?

I see no errors but only css files have source maps and show up in webpack:// in the chrome debugger. None of the js files seems to get source maps automatically. Tried to add GENERATE_SOURCEMAP=true to .env but didn't make a difference.

(Write your answer here.)

Which terms did you search for in User Guide?

I searched various terms for create-react-app dev server, source maps and so on. I am sure I am doing something wrong, but I have retraced my steps and I am not finding anything I would do different.

(Write your answer here if relevant.)

Environment

Environment: OS: macOS High Sierra 10.13.6 Node: 10.7.0 Yarn: 1.9.4 npm: 6.3.0 Watchman: Not Found Xcode: Xcode 9.4.1 Build version 9F2000 Android Studio: Not Found

Packages: (wanted => installed) react: ^16.4.2 => 16.4.2 react-dom: ^16.4.2 => 16.4.2 react-scripts: 1.1.4 => 1.1.4

Steps to Reproduce

(Write your steps here:)

  1. create-react-app new-app
  2. cd new-app
  3. yarn; yarn start

Expected Behavior

I would expect it to default to using source maps for javascript during development.

Actual Behavior

I don't have source maps for javascript.

Reproducible Demo

Since this is dev mode, I am not sure a deployment will show anything useful.

richtera avatar Aug 13 '18 18:08 richtera

If you can see this in DevTools, then Sourcemaps are working screen shot 2018-08-15 at 2 34 32 pm

Also you can check if sourcemaps are enabled in Chrome https://developers.google.com/web/tools/chrome-devtools/javascript/source-maps

kartiklad avatar Aug 15 '18 04:08 kartiklad

I see webpack in dev but only css files within it. No is files

richtera avatar Aug 15 '18 11:08 richtera

You need to look under localhost:3000, not under webpack://. 😄

Timer avatar Sep 17 '18 23:09 Timer