Skip to content

Commit

Permalink
chore(NA): enables @babel/plugin-transform-runtime to decrease output…
Browse files Browse the repository at this point in the history
… size (#109843)

* chore(NA): enables @babel/plugin-transform-runtime to decrease output size

* chore(NA): update @kbn/pm bundle

* chore(NA): missing config on corejs for runtime

* fix(NA): flaky unit test

* chore(NA): update limits file

* chore(NA): remove corejs

* chore(NA): old config files

* chore(NA): update limmits file

* chore(NA): updated yarn lock file

* chore(NA): update limits

* chore(NA): restore original test file

* chore(NA): skip flaky test

* chore(NA): skip another failing test
  • Loading branch information
mistic authored Aug 25, 2021
1 parent a8cd0d1 commit 36eaf7f
Show file tree
Hide file tree
Showing 6 changed files with 2,728 additions and 2,584 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"yarn": "^1.21.1"
},
"dependencies": {
"@babel/runtime": "^7.12.5",
"@elastic/apm-rum": "^5.9.1",
"@elastic/apm-rum-react": "^1.3.1",
"@elastic/charts": "34.2.1",
Expand Down Expand Up @@ -440,7 +441,6 @@
"@babel/preset-react": "^7.12.10",
"@babel/preset-typescript": "^7.12.7",
"@babel/register": "^7.12.10",
"@babel/runtime": "^7.12.5",
"@babel/traverse": "^7.12.12",
"@babel/types": "^7.12.12",
"@bazel/ibazel": "^0.15.10",
Expand Down
2 changes: 2 additions & 0 deletions packages/kbn-babel-preset/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ DEPS = [
"@npm//@babel/plugin-proposal-nullish-coalescing-operator",
"@npm//@babel/plugin-proposal-optional-chaining",
"@npm//@babel/plugin-proposal-private-methods",
"@npm//@babel/plugin-transform-runtime",
"@npm//@babel/preset-env",
"@npm//@babel/preset-react",
"@npm//@babel/preset-typescript",
"@npm//@babel/runtime",
"@npm//@emotion/babel-preset-css-prop",
"@npm//babel-plugin-add-module-exports",
"@npm//babel-plugin-styled-components",
Expand Down
8 changes: 8 additions & 0 deletions packages/kbn-babel-preset/common_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ const plugins = [
// Proposal is on stage 4, and included in ECMA-262 (https://github.com/tc39/proposal-export-ns-from)
// Need this since we are using TypeScript 3.9+
require.resolve('@babel/plugin-proposal-private-methods'),

// It enables the @babel/runtime so we can decrease the bundle sizes of the produced outputs
[
require.resolve('@babel/plugin-transform-runtime'),
{
version: '^7.12.5',
},
],
];

module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pageLoadAssetSize:
embeddableEnhanced: 41145
enterpriseSearch: 35741
esUiShared: 326654
expressions: 224136
features: 21723
fieldFormats: 92628
globalSearch: 29696
Expand Down Expand Up @@ -66,7 +65,6 @@ pageLoadAssetSize:
searchprofiler: 67080
security: 95864
securityOss: 30806
securitySolution: 217673
share: 99061
snapshotRestore: 79032
spaces: 57868
Expand Down Expand Up @@ -116,3 +114,5 @@ pageLoadAssetSize:
expressionShape: 34008
interactiveSetup: 18532
expressionTagcloud: 27505
securitySolution: 232514
expressions: 239290
Loading

0 comments on commit 36eaf7f

Please sign in to comment.