Skip to content
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

[babel] tweak babel options for performance and debugging #11535

Merged
merged 4 commits into from
May 8, 2017

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Apr 28, 2017

Closes #9472

  • Removes stage-1 preset and uses individual plugins as necessary
  • Consolidates the babel config into a preset for node and a preset for webpack
  • Enable babel-preset-env's useBuiltIns option which trims the core-js polyfills to just those necessary for the current node version
  • Removes the all stage 1 and 2 plugins except babel-plugin-transform-class-properties

@spalger spalger requested review from tylersmalley and jbudz April 28, 2017 23:00
@spalger spalger force-pushed the babel/tweak-options branch 4 times, most recently from 1a7fe50 to f6ea8ad Compare April 28, 2017 23:52
@spalger
Copy link
Contributor Author

spalger commented May 1, 2017

jenkins, test this

@jbudz
Copy link
Member

jbudz commented May 3, 2017

Nice.

Before:

49M May  3 12:28 kibana-6.0.0-alpha1-SNAPSHOT-darwin-x86_64.tar.gz
50M May  3 12:27 kibana-6.0.0-alpha1-SNAPSHOT-linux-x86.tar.gz
51M May  3 12:27 kibana-6.0.0-alpha1-SNAPSHOT-linux-x86_64.tar.gz
68M May  3 12:27 kibana-6.0.0-alpha1-SNAPSHOT-windows-x86.zip

After:

48M May  3 12:10 kibana-6.0.0-alpha1-SNAPSHOT-darwin-x86_64.tar.gz
50M May  3 12:10 kibana-6.0.0-alpha1-SNAPSHOT-linux-x86.tar.gz
50M May  3 12:10 kibana-6.0.0-alpha1-SNAPSHOT-linux-x86_64.tar.gz
61M May  3 12:10 kibana-6.0.0-alpha1-SNAPSHOT-windows-x86.zip

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. Tested with x-pack, things are functioning.

package.json Outdated
@@ -98,14 +98,16 @@
"babel-jest": "19.0.0",
"babel-loader": "6.2.10",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-async-generator-functions": "^6.24.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these be locked to the patch version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, I've been using yarn which doesn't do this because of yarn.lock

@jimgoodwin jimgoodwin added v5.4.1 and removed v5.4.0 labels May 4, 2017
@spalger spalger force-pushed the babel/tweak-options branch from acfb7e0 to 14c91a7 Compare May 5, 2017 19:49
package.json Outdated
"babel-plugin-transform-async-generator-functions": "6.24.1",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-unicode-property-regex": "2.0.1",
Copy link
Contributor

@kimjoar kimjoar May 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is babel-plugin-transform-unicode-property-regex and babel-plugin-syntax-dynamic-import used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally basing the list of plugins off of babel#master, rather than the released versions

@kimjoar
Copy link
Contributor

kimjoar commented May 8, 2017

We seem to have one usage of transform-export-extensions, which is stage 1:

$ find src -name "*.js" | xargs grep "export \* as"
src/deprecation/index.js:export * as Deprecations from './deprecations';

EDIT: Bah, I was checking in master, not the branch 🙈 I see that it's fixed in the PR. Don't mind me, I'll go hide under a rock.

@spalger spalger merged commit 36ecf13 into elastic:master May 8, 2017
spalger added a commit to spalger/kibana that referenced this pull request May 8, 2017
)

* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps

(cherry picked from commit 36ecf13)
@spalger spalger removed the v5.3.3 label May 8, 2017
spalger added a commit to spalger/kibana that referenced this pull request May 8, 2017
)

* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps

(cherry picked from commit 36ecf13)
@spalger spalger removed the v5.4.1 label May 8, 2017
spalger added a commit that referenced this pull request May 9, 2017
…11661)

* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps

(cherry picked from commit 36ecf13)
snide pushed a commit to snide/kibana that referenced this pull request May 30, 2017
)

* [babel] tweak babel options for performance and debugging

* [babel] remove babel-plugin-transform-export-extensions

* [npm] lock new deps to the patch version

* [npm] remove unused deps
@spalger spalger deleted the babel/tweak-options branch October 18, 2019 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Operations Team label for Operations Team v5.5.0 v6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants