@samitouri / QOS-React / commits / 33a2bf78c4

[DevTools] Silence unactionable bundle warnings in shell (#34034)

Sebastian "Sebbie" Silbermann committed Jul 29, 2025 at 11:18 UTC 33a2bf78c47bf3298655908eec123f5fedbebcc7
1 file changed +25 -1
packages/react-devtools-shell/webpack-server.js
+25 -1
@@ -47,7 +47,31 @@ const E2E_APP_BUILD_DIR = process.env.REACT_VERSION
47 const makeConfig = (entry, alias) => ({
48 mode: __DEV__ ? 'development' : 'production',
49 devtool: __DEV__ ? 'cheap-source-map' : 'source-map',
50 - stats: 'normal',
50 + stats: {
51 + preset: 'normal',
52 + warningsFilter: [
53 + warning => {
54 + const message = warning.message;
55 + // We use ReactDOM legacy APIs conditionally based on the React version.
56 + // react-native-web also accesses legacy APIs statically but we don't end
57 + // up using them at runtime.
58 + return (
59 + message.startsWith(
60 + `export 'findDOMNode' (imported as 'findDOMNode') was not found in 'react-dom'`,
61 + ) ||
62 + message.startsWith(
63 + `export 'hydrate' (reexported as 'hydrate') was not found in 'react-dom'`,
64 + ) ||
65 + message.startsWith(
66 + `export 'render' (imported as 'render') was not found in 'react-dom'`,
67 + ) ||
68 + message.startsWith(
69 + `export 'unmountComponentAtNode' (imported as 'unmountComponentAtNode') was not found in 'react-dom'`,
70 + )
71 + );
72 + },
73 + ],
74 + },
75 entry,
76 output: {
77 publicPath: '/dist/',