Skip to content

Commit d9e80d2

Browse files
committed
[babel] remove unused/unneeded babel plugins
1 parent 963fe0c commit d9e80d2

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
@@ -1098,7 +1098,7 @@
10981098
globals "^11.1.0"
10991099
lodash "^4.17.19"
11001100

1101-
"@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", "@babel/types@^7.9.5":
1101+
"@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.4", "@babel/types@^7.9.5":
11021102
version "7.11.0"
11031103
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d"
11041104
integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==
@@ -7367,14 +7367,6 @@ [email protected]:
73677367
dependencies:
73687368
"@babel/helper-plugin-utils" "7.10.4"
73697369

7370-
babel-plugin-filter-imports@^3.0.0:
7371-
version "3.0.0"
7372-
resolved "https://registry.yarnpkg.com/babel-plugin-filter-imports/-/babel-plugin-filter-imports-3.0.0.tgz#a849683837ad29960da17492fb32789ab6b09a11"
7373-
integrity sha512-p/chjzVTgCxUqyLM0q/pfWVZS7IJTwGQMwNg0LOvuQpKiTftQgZDtkGB8XvETnUw19rRcL7bJCTopSwibTN2tA==
7374-
dependencies:
7375-
"@babel/types" "^7.4.0"
7376-
lodash "^4.17.11"
7377-
73787370
babel-plugin-istanbul@^6.0.0:
73797371
version "6.0.0"
73807372
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765"
@@ -7528,14 +7520,6 @@ babel-plugin-transform-define@^1.3.1:
75287520
lodash "^4.17.11"
75297521
traverse "0.6.6"
75307522

7531-
babel-plugin-transform-imports@^2.0.0:
7532-
version "2.0.0"
7533-
resolved "https://registry.yarnpkg.com/babel-plugin-transform-imports/-/babel-plugin-transform-imports-2.0.0.tgz#9e5f49f751a9d34ba8f4bb988c7e48ed2419c6b6"
7534-
integrity sha512-65ewumYJ85QiXdcB/jmiU0y0jg6eL6CdnDqQAqQ8JMOKh1E52VPG3NJzbVKWcgovUR5GBH8IWpCXQ7I8Q3wjgw==
7535-
dependencies:
7536-
"@babel/types" "^7.4"
7537-
is-valid-path "^0.1.1"
7538-
75397523
babel-plugin-transform-inline-consecutive-adds@^0.4.3:
75407524
version "0.4.3"
75417525
resolved "https://registry.yarnpkg.com/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz#323d47a3ea63a83a7ac3c811ae8e6941faf2b0d1"
@@ -17695,7 +17679,7 @@ is-valid-glob@^1.0.0:
1769517679
resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
1769617680
integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=
1769717681

17698-
[email protected], is-valid-path@^0.1.1:
17682+
1769917683
version "0.1.1"
1770017684
resolved "https://registry.yarnpkg.com/is-valid-path/-/is-valid-path-0.1.1.tgz#110f9ff74c37f663e1ec7915eb451f2db93ac9df"
1770117685
integrity sha1-EQ+f90w39mPh7HkV60UfLbk6yd8=

0 commit comments

Comments
 (0)