From 12102ba440f4bbc5b067bcb31e74e51ac35a9a48 Mon Sep 17 00:00:00 2001 From: nuintun Date: Thu, 28 Mar 2024 21:05:09 +0800 Subject: [PATCH] chore: Update tools --- tools/bin/webpack.config.dev.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/bin/webpack.config.dev.js b/tools/bin/webpack.config.dev.js index f4a9900e..8b27a823 100644 --- a/tools/bin/webpack.config.dev.js +++ b/tools/bin/webpack.config.dev.js @@ -70,6 +70,14 @@ function httpError(error) { configure.devtool = 'eval-cheap-module-source-map'; configure.watchOptions = { aggregateTimeout: 256 }; + // 禁用 React DevTools 下载提示 + // See: https://github.com/facebook/react/pull/11448 + configure.plugins.push( + new webpack.DefinePlugin({ + __REACT_DEVTOOLS_GLOBAL_HOOK__: '({ isDisabled: true })' + }) + ); + const app = new Koa(); const compiler = webpack(configure);