Skip to content
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

Devtools: Fix build-for-devtools #28976

Merged
merged 1 commit into from
May 2, 2024
Merged

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented May 2, 2024

Stack:

  1. Devtools: Streamline getting extension from branch #28975
  2. Devtools: Fix build-for-devtools #28976 <--- You're here
  3. DevTools: Fix inspecting components with multiple reads of the same Context in React 17 #28974

Summary

Some devtools code imports from shared/ this could result in shared/FeatureFlags becoming part of the module graph as it did with #28813. Without this fix, we'd have a bare __EXPERIMENTAL__ identifier that would result in react_devtools_backend_compact.js:3724 Uncaught ReferenceError: __EXPERIMENTAL__ is not defined in the final build.

We already hardcoded __EXPERIMENTAL__: true in the frontend Webpack config so I'm doing the same for the backend.

How did you test this change?

  • Use react-devtools-chrome-extension.zip from this branch and no longer observe ReferenceError when inspecting a React app

@react-sizebot
Copy link

react-sizebot commented May 2, 2024

Comparing: c44e9d1...0618945

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.66 kB 6.66 kB +0.11% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 492.61 kB 492.61 kB = 87.88 kB 87.88 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 498.86 kB 498.86 kB = 88.92 kB 88.93 kB
facebook-www/ReactDOM-prod.classic.js = 591.22 kB 591.22 kB = 103.96 kB 103.96 kB
facebook-www/ReactDOM-prod.modern.js = 567.44 kB 567.44 kB = 100.36 kB 100.36 kB
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.26 kB 0.00 kB Deleted 16.02 kB 0.00 kB

Generated by 🚫 dangerJS against 0618945

@eps1lon eps1lon marked this pull request as ready for review May 2, 2024 14:35
@eps1lon eps1lon requested a review from hoxyq May 2, 2024 14:35
@eps1lon eps1lon merged commit 14f71db into facebook:main May 2, 2024
38 checks passed
@eps1lon eps1lon deleted the rdt/fix-build branch May 2, 2024 19:59
hoxyq added a commit that referenced this pull request May 8, 2024
Full list of changes (not a public changelog):
* fix[react-devtools/ci]: fix configurations for e2e testing
([hoxyq](https://github.com/hoxyq) in
[#29016](#29016))
* feat[react-devtools]: display forget badge for components in profiling
session ([hoxyq](https://github.com/hoxyq) in
[#29014](#29014))
* fix[react-devtools]: add backwards compat with legacy element type
symbol ([hoxyq](https://github.com/hoxyq) in
[#28982](#28982))
* Expose "view source" options to Fusebox integration
([motiz88](https://github.com/motiz88) in
[#28973](#28973))
* Enable inspected element context menu in Fusebox
([motiz88](https://github.com/motiz88) in
[#28972](#28972))
* Check in `frontend.d.ts` for react-devtools-fusebox, include in build
output ([motiz88](https://github.com/motiz88) in
[#28970](#28970))
* Devtools: Fix build-for-devtools
([eps1lon](https://github.com/eps1lon) in
[#28976](#28976))
* Move useMemoCache hook to react/compiler-runtime
([kassens](https://github.com/kassens) in
[#28954](#28954))
* warn -> error for Test Renderer deprecation
([acdlite](https://github.com/acdlite) in
[#28904](#28904))
* [react-dom] move all client code to `react-dom/client`
([gnoff](https://github.com/gnoff) in
[#28271](#28271))
* Rename the react.element symbol to react.transitional.element
([sebmarkbage](https://github.com/sebmarkbage) in
[#28813](#28813))
* Rename Forget badge ([jbonta](https://github.com/jbonta) in
[#28858](#28858))
* Devtools: Add support for useFormStatus
([eps1lon](https://github.com/eps1lon) in
[#28413](#28413))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants