mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Disable React dev tools in testDev
builds (#12955)
The React dev tools can result in console errors if dev tools is not open during the test. Some of our e2e tests fail if there are any console errors, so these errors break those tests. `react-devtools` has been completely disabled for `testDev` builds to make debugging e2e tests easier. The React dev tools can still be used from development builds.
This commit is contained in:
parent
91af73b211
commit
56c91262e9
@ -366,6 +366,7 @@ function createFactoredBuild({
|
||||
minify,
|
||||
reloadOnChange,
|
||||
shouldLintFenceFiles,
|
||||
testing,
|
||||
});
|
||||
|
||||
// set bundle entries
|
||||
@ -543,6 +544,7 @@ function createNormalBundle({
|
||||
minify,
|
||||
reloadOnChange,
|
||||
shouldLintFenceFiles,
|
||||
testing,
|
||||
});
|
||||
|
||||
// set bundle entries
|
||||
@ -599,6 +601,7 @@ function setupBundlerDefaults(
|
||||
minify,
|
||||
reloadOnChange,
|
||||
shouldLintFenceFiles,
|
||||
testing,
|
||||
},
|
||||
) {
|
||||
const { bundlerOpts } = buildConfiguration;
|
||||
@ -620,7 +623,7 @@ function setupBundlerDefaults(
|
||||
});
|
||||
|
||||
// Ensure react-devtools are not included in non-dev builds
|
||||
if (!devMode) {
|
||||
if (!devMode || testing) {
|
||||
bundlerOpts.manualIgnore.push('react-devtools');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user