Skip to content

DevTools: Drop IE 11 support #19875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
Brian Vaughn committed Sep 21, 2020
commit a2e4c881fc44b97f75a0df1a5bc22eae15d94bdd
5 changes: 5 additions & 0 deletions packages/react-devtools-core/webpack.backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const __DEV__ = NODE_ENV === 'development';

const DEVTOOLS_VERSION = getVersionString();

// This targets RN/Hermes.
process.env.BABEL_CONFIG_ADDITIONAL_TARGETS = JSON.stringify({
ie: '11',
});

module.exports = {
mode: __DEV__ ? 'development' : 'production',
devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map',
Expand Down
9 changes: 7 additions & 2 deletions packages/react-devtools-shared/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ module.exports = api => {
targets.chrome = minChromeVersion.toString();
targets.firefox = minFirefoxVersion.toString();

// This targets RN/Hermes.
targets.ie = '11';
let additionalTargets = process.env.BABEL_CONFIG_ADDITIONAL_TARGETS;
if (additionalTargets) {
additionalTargets = JSON.parse(additionalTargets);
for (const target in additionalTargets) {
targets[target] = additionalTargets[target];
}
}
}
const plugins = [
['@babel/plugin-transform-flow-strip-types'],
Expand Down