mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
[DevTools] Silence unactionable bundle warnings in shell (#34034)
This commit is contained in:
committed by
GitHub
parent
5d7e8b90e2
commit
33a2bf78c4
26
packages/react-devtools-shell/webpack-server.js
vendored
26
packages/react-devtools-shell/webpack-server.js
vendored
@@ -47,7 +47,31 @@ const E2E_APP_BUILD_DIR = process.env.REACT_VERSION
|
||||
const makeConfig = (entry, alias) => ({
|
||||
mode: __DEV__ ? 'development' : 'production',
|
||||
devtool: __DEV__ ? 'cheap-source-map' : 'source-map',
|
||||
stats: 'normal',
|
||||
stats: {
|
||||
preset: 'normal',
|
||||
warningsFilter: [
|
||||
warning => {
|
||||
const message = warning.message;
|
||||
// We use ReactDOM legacy APIs conditionally based on the React version.
|
||||
// react-native-web also accesses legacy APIs statically but we don't end
|
||||
// up using them at runtime.
|
||||
return (
|
||||
message.startsWith(
|
||||
`export 'findDOMNode' (imported as 'findDOMNode') was not found in 'react-dom'`,
|
||||
) ||
|
||||
message.startsWith(
|
||||
`export 'hydrate' (reexported as 'hydrate') was not found in 'react-dom'`,
|
||||
) ||
|
||||
message.startsWith(
|
||||
`export 'render' (imported as 'render') was not found in 'react-dom'`,
|
||||
) ||
|
||||
message.startsWith(
|
||||
`export 'unmountComponentAtNode' (imported as 'unmountComponentAtNode') was not found in 'react-dom'`,
|
||||
)
|
||||
);
|
||||
},
|
||||
],
|
||||
},
|
||||
entry,
|
||||
output: {
|
||||
publicPath: '/dist/',
|
||||
|
||||
Reference in New Issue
Block a user