@oxog/react-check 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-inject.global.js +2 -2
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5498,6 +5498,23 @@ var ReactCheckInjector = class {
|
|
|
5498
5498
|
return;
|
|
5499
5499
|
}
|
|
5500
5500
|
win.__REACTCHECK_INJECTED__ = true;
|
|
5501
|
+
if (!win.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
5502
|
+
const hook = {
|
|
5503
|
+
renderers: /* @__PURE__ */ new Map(),
|
|
5504
|
+
supportsFiber: true,
|
|
5505
|
+
inject: function(renderer) {
|
|
5506
|
+
const id = this.renderers.size + 1;
|
|
5507
|
+
this.renderers.set(id, renderer);
|
|
5508
|
+
return id;
|
|
5509
|
+
},
|
|
5510
|
+
onCommitFiberRoot: function() {
|
|
5511
|
+
},
|
|
5512
|
+
onCommitFiberUnmount: function() {
|
|
5513
|
+
}
|
|
5514
|
+
};
|
|
5515
|
+
win.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook;
|
|
5516
|
+
console.log("[ReactCheck] DevTools hook installed");
|
|
5517
|
+
}
|
|
5501
5518
|
const injector = new ReactCheckInjector();
|
|
5502
5519
|
if (document.readyState === "loading") {
|
|
5503
5520
|
document.addEventListener("DOMContentLoaded", () => {
|