Skip to content

Use major.minor corejs version in babel config

Vitaly Slobodin requested to merge vs/babel-config-set-corejs-minor-version into master

Specifying minor version is required to tell babel to pull the correct corejs version.

From babel documentation:

It is recommended to specify the minor version otherwise "3" will be interpreted as "3.0" which may not include polyfills for the latest features.

Our current configuration misses some polyfills and this leads to JavaScript runtime errors. Add minor version to pull all required polyfills.

Before:

[/home/vitaly/Development/gitlab/gitlab-development-kit/gitlab/app/assets/javascripts/behaviors/markdown/render_kroki.js]
Based on your code and targets, the corejs3 polyfill did not add any polyfill.

After:

[/home/vitaly/Development/gitlab/gitlab-development-kit/gitlab/app/assets/javascripts/behaviors/markdown/render_kroki.js]
The corejs3 polyfill added the following polyfills:
  esnext.async-iterator.for-each { "chrome":"84", "edge":"84", "firefox":"78", "safari":"13.1" }
  esnext.iterator.constructor { "chrome":"84", "edge":"84", "firefox":"78", "safari":"13.1" }
  esnext.iterator.for-each { "chrome":"84", "edge":"84", "firefox":"78", "safari":"13.1" }
  es.object.has-own { "chrome":"84", "edge":"84", "firefox":"78", "safari":"13.1" }
Edited by Vitaly Slobodin

Merge request reports