react/packages/react-devtools-extensions/firefox
Mengdi Chen fcf2187919
[DevTools] Remove renderer.js from extension build (#26234)
## Summary

When looking into the compiled code of `installHook.js` of the extension
build, I noticed that it actually includes the large `attach` function
(from renderer.js). I don't think it was expected.
This is because `hook.js` imports from `backend/console.js` which
imports from `backend/renderer.js` for `getInternalReactConstants`
A straightforward way is to extract function
`getInternalReactConstants`. However, I think it's more simplified to
just merge these two files and save the 361K renderer.js from the
extension build since we have always been loading this code anyways.
I changed the execution check from `__REACT_DEVTOOLS_ATTACH__ ` to the
session storage.

## How did you test this change?

Everything works normal in my local build.
2023-03-03 14:01:58 -05:00
..
README.md Update devtools-extensions build script to reflect changes in local b… (#21004) 2021-03-15 09:46:46 -04:00
build.js Re-enabled DevTools context menu option in Firefox to inspect function prop source (#17838) 2020-01-14 14:00:28 -08:00
deploy.js Cleaned up some extnesions build script stuff 2019-08-13 22:15:38 -07:00
manifest.json [DevTools] Remove renderer.js from extension build (#26234) 2023-03-03 14:01:58 -05:00
now.json Reorganized folders into packages/* 2019-08-13 15:59:43 -07:00
test.js Update devtools-extensions build script to reflect changes in local b… (#21004) 2021-03-15 09:46:46 -04:00

README.md

The Firefox extension

The source code for this extension has moved to shells/webextension.

Modify the source code there and then rebuild this extension by running node build from this directory or yarn run build:firefox from the root directory.

Testing in Firefox

  1. Build the extension: node build
  2. Follow the on-screen instructions.

You can test upcoming releases of Firefox by downloading the Beta or Nightly build from the Firefox releases page and then following the on-screen instructions after building.