Skip to content

Commit a2e4c88

Browse files
author
Brian Vaughn
committed
DevTools: Drop IE 11 support
DevTools shared Babel config previously supported IE 11 to target Hermes (for the standalone backend that gets embedded within React Native apps). This targeting resulted in less optimal code for other DevTools targets though which did not need to support IE 11. This PR updates the shared config to remove IE 11 support by default, and only enables it for the standalone backend target.
1 parent a774502 commit a2e4c88

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/react-devtools-core/webpack.backend.js

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ const __DEV__ = NODE_ENV === 'development';
1717

1818
const DEVTOOLS_VERSION = getVersionString();
1919

20+
// This targets RN/Hermes.
21+
process.env.BABEL_CONFIG_ADDITIONAL_TARGETS = JSON.stringify({
22+
ie: '11',
23+
});
24+
2025
module.exports = {
2126
mode: __DEV__ ? 'development' : 'production',
2227
devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map',

packages/react-devtools-shared/babel.config.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ module.exports = api => {
2525
targets.chrome = minChromeVersion.toString();
2626
targets.firefox = minFirefoxVersion.toString();
2727

28-
// This targets RN/Hermes.
29-
targets.ie = '11';
28+
let additionalTargets = process.env.BABEL_CONFIG_ADDITIONAL_TARGETS;
29+
if (additionalTargets) {
30+
additionalTargets = JSON.parse(additionalTargets);
31+
for (const target in additionalTargets) {
32+
targets[target] = additionalTargets[target];
33+
}
34+
}
3035
}
3136
const plugins = [
3237
['@babel/plugin-transform-flow-strip-types'],

0 commit comments

Comments
 (0)