Skip to content

Commit 5143425

Browse files
Spencerspalgerelasticmachine
authored
[7.x] [babel] remove unused/unneeded babel plugins (#79173) (#79200)
Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # yarn.lock
1 parent 0064037 commit 5143425

File tree

4 files changed

+3
-58
lines changed

4 files changed

+3
-58
lines changed

packages/kbn-babel-preset/node_preset.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,6 @@
1818
*/
1919

2020
module.exports = (_, options = {}) => {
21-
const overrides = [];
22-
if (!process.env.ALLOW_PERFORMANCE_HOOKS_IN_TASK_MANAGER) {
23-
overrides.push({
24-
test: [/x-pack[\/\\]legacy[\/\\]plugins[\/\\]task_manager/],
25-
plugins: [
26-
[
27-
require.resolve('babel-plugin-filter-imports'),
28-
{
29-
imports: {
30-
perf_hooks: ['performance'],
31-
},
32-
},
33-
],
34-
],
35-
});
36-
}
37-
3821
return {
3922
presets: [
4023
[
@@ -74,6 +57,5 @@ module.exports = (_, options = {}) => {
7457
},
7558
],
7659
],
77-
overrides,
7860
};
7961
};

packages/kbn-babel-preset/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@kbn/babel-preset",
3-
"private": true,
43
"version": "1.0.0",
4+
"private": true,
55
"license": "Apache-2.0",
66
"dependencies": {
77
"@babel/plugin-proposal-class-properties": "^7.10.4",
@@ -13,10 +13,8 @@
1313
"@babel/preset-react": "^7.10.4",
1414
"@babel/preset-typescript": "^7.10.4",
1515
"babel-plugin-add-module-exports": "^1.0.2",
16-
"babel-plugin-filter-imports": "^3.0.0",
1716
"babel-plugin-styled-components": "^1.10.7",
1817
"babel-plugin-transform-define": "^1.3.1",
19-
"babel-plugin-transform-imports": "^2.0.0",
2018
"react-is": "^16.8.0",
2119
"styled-components": "^5.1.0"
2220
}

packages/kbn-babel-preset/webpack_preset.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,5 @@ module.exports = () => {
4040
},
4141
],
4242
],
43-
// NOTE: we can enable this by default for everything as soon as we only have one instance
44-
// of lodash across the entire project. For now we are just enabling it for siem
45-
// as they are extensively using the lodash v4
46-
overrides: [
47-
{
48-
test: [/x-pack[\/\\]legacy[\/\\]plugins[\/\\]siem[\/\\]public/],
49-
plugins: [
50-
[
51-
require.resolve('babel-plugin-transform-imports'),
52-
{
53-
'lodash/?(((\\w*)?/?)*)': {
54-
transform: 'lodash/${1}/${member}',
55-
preventFullImport: false,
56-
},
57-
},
58-
],
59-
],
60-
},
61-
],
6243
};
6344
};

yarn.lock

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@
10771077
globals "^11.1.0"
10781078
lodash "^4.17.19"
10791079

1080-
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4", "@babel/types@^7.4.0", "@babel/types@^7.4.4":
1080+
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.0", "@babel/types@^7.4.4":
10811081
version "7.11.0"
10821082
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d"
10831083
integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==
@@ -6837,14 +6837,6 @@ babel-plugin-emotion@^10.0.22:
68376837
find-root "^1.1.0"
68386838
source-map "^0.5.7"
68396839

6840-
babel-plugin-filter-imports@^3.0.0:
6841-
version "3.0.0"
6842-
resolved "https://registry.yarnpkg.com/babel-plugin-filter-imports/-/babel-plugin-filter-imports-3.0.0.tgz#a849683837ad29960da17492fb32789ab6b09a11"
6843-
integrity sha512-p/chjzVTgCxUqyLM0q/pfWVZS7IJTwGQMwNg0LOvuQpKiTftQgZDtkGB8XvETnUw19rRcL7bJCTopSwibTN2tA==
6844-
dependencies:
6845-
"@babel/types" "^7.4.0"
6846-
lodash "^4.17.11"
6847-
68486840
babel-plugin-istanbul@^5.1.0:
68496841
version "5.1.1"
68506842
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.1.1.tgz#7981590f1956d75d67630ba46f0c22493588c893"
@@ -7007,14 +6999,6 @@ babel-plugin-transform-define@^1.3.1:
70076999
lodash "^4.17.11"
70087000
traverse "0.6.6"
70097001

7010-
babel-plugin-transform-imports@^2.0.0:
7011-
version "2.0.0"
7012-
resolved "https://registry.yarnpkg.com/babel-plugin-transform-imports/-/babel-plugin-transform-imports-2.0.0.tgz#9e5f49f751a9d34ba8f4bb988c7e48ed2419c6b6"
7013-
integrity sha512-65ewumYJ85QiXdcB/jmiU0y0jg6eL6CdnDqQAqQ8JMOKh1E52VPG3NJzbVKWcgovUR5GBH8IWpCXQ7I8Q3wjgw==
7014-
dependencies:
7015-
"@babel/types" "^7.4"
7016-
is-valid-path "^0.1.1"
7017-
70187002
babel-plugin-transform-inline-consecutive-adds@^0.4.3:
70197003
version "0.4.3"
70207004
resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz#323d47a3ea63a83a7ac3c811ae8e6941faf2b0d1"
@@ -16944,7 +16928,7 @@ is-valid-glob@^1.0.0:
1694416928
resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
1694516929
integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=
1694616930

16947-
is-valid-path@0.1.1, is-valid-path@^0.1.1:
16931+
is-valid-path@0.1.1:
1694816932
version "0.1.1"
1694916933
resolved "https://registry.yarnpkg.com/is-valid-path/-/is-valid-path-0.1.1.tgz#110f9ff74c37f663e1ec7915eb451f2db93ac9df"
1695016934
integrity sha1-EQ+f90w39mPh7HkV60UfLbk6yd8=

0 commit comments

Comments
 (0)