From 05f42b59f903b95eff4329135c658ad5793fc088 Mon Sep 17 00:00:00 2001 From: jhen Date: Sun, 23 Jul 2023 12:37:20 +0800 Subject: [PATCH] Revert "Fix react-devtools not auto detect system theme" This reverts commit 98ed518bdc5e365a3e8ed812842ce4f747a15f3b. --- scripts/patch-modules.js | 19 ------------------- scripts/postinstall.js | 2 -- 2 files changed, 21 deletions(-) delete mode 100644 scripts/patch-modules.js diff --git a/scripts/patch-modules.js b/scripts/patch-modules.js deleted file mode 100644 index e3137a37..00000000 --- a/scripts/patch-modules.js +++ /dev/null @@ -1,19 +0,0 @@ -const shell = require('shelljs'); -const path = require('path'); - -console.log('Patch react-devtools-core'); - -const rdStandalone = path.join( - __dirname, - '../dist/node_modules/react-devtools-core/dist/standalone.js' -); - -// Make react-devtools-core to auto detect theme -// We still use this patch because patch-package to patch js bundle is not very ideal -shell.sed( - '-i', - // eslint-disable-next-line - /bridge:e,browserTheme:t="light"/, - 'bridge:e,browserTheme:t="auto"', - rdStandalone -); diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 659b5217..6ee28a05 100755 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -15,8 +15,6 @@ async function run() { '-rf', 'node_modules/apollo-client-devtools/{assets,build,development,shells/dev,src}' ); - // eslint-disable-next-line - require('./patch-modules'); } run();