-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Enable source maps for DevTools production builds #19773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable source maps for DevTools production builds #19773
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 76d79f2:
|
|
@bvaughn hey! Do you think we are good to merge on this one or is there more to do? |
|
@jpribyl Needs to be reviewed by someone on the team. Normal PR process. |
|
Looks like this change breaks the local test harness: To reproduce:
cd packages/react-devtools-inline
yarn start
cd packages/react-devtools-shell
yarn start
|
|
Oh dear, it definitely does! I will look into it a bit this evening - did you run across any clues to point us in the right direction? I'm guessing there is probably just another config option which must be updated? |
|
I didn't have time to dig in, sorry. |
…com:jpribyl/react into issue-19769-enable-source-maps-for-devtools
|
I found this thread webpack/webpack#5491 and was able to trace the issue to |
|
Ok 👍 Full |
|
Thanks for the info! 6-7 seconds is fairly slow when you're iterating on changes. Hmm. Let me think about it a little. |
|
One thing that may help - that is only initial load / build time. it is more like 100ms for me locally while editing files: |
|
Oh! Ok that's much better. I was mostly only curious about the difference in times for changes after the initial startup. |
|
Ahhh sorry about that! It looks like even the full |
|
Hm, that's surprising. I tried temporarily turning on source maps for the DevTools inline and shell packages yesterday– and it made hot reloading a lot slower for the web shell. I ended up turning them back off for this reason. |
|
Interesting, I should probably test on a lower end machine.. this one is very quick. I'll go ahead and push the |
Sounds great! Yes, I will test again, as soon as #19774 lands. |
|
Testing this branch this morning. Rebuilds are fast for the DEV test harness, so that's great. 👍 |
|
Thank you. This looks great. |
|
DevTools failed to load SourceMap: Could not load content for chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/injectGlobalHook.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME |
|
I got the exact same issue as @yoyo837 today... |


see #19769 for more context
master.yarnin the repository root.yarn test). Tip:yarn test --watch TestNameis helpful in development.yarn test-prodto test in the production environment. It supports the same options asyarn test.yarn debug-test --watch TestName, openchrome://inspect, and press "Inspect".yarn prettier).yarn lint). Tip:yarn lincto only check changed files.yarn flow).Summary
This PR examines the possibility of enabling source maps for DevTools builds. It will enable cheap source maps for dev builds and full source maps for production builds. Here is a summary of local buiild time / bundle size:
With source map:
dev (all browsers were effectively identical):
prod:
Without source map
dev:
prod: