babel / babel/website

@babel/plugin-transform-runtime and corejs option

Open
#2,494 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
777
Forks
1.4k
Avg merge
16h 45m
Merged PRs (30d)
3

Description

Caveat: I have just recently been learning everything babel, but I've read up extensively, yet it is still possible I misunderstand something.

According to https://babeljs.io/docs/en/babel-plugin-transform-runtime#corejs and this text:

> By default, @babel/plugin-transform-runtime doesn't polyfill proposals. If you are using corejs: 3, you can opt into this by enabling using the proposals: true option.

It makes it sound like the package will actually polyfill _non_ proposals. I assume that is incorrect? `@babel/plugin-transform-runtime` never inserts any polyfills. It just adds imports for helper functions. And in addition when the `corejs` option is used, it is unclear what it does for me. It sounds like it re-writes helpers, but since the intention of `@babel/plugin-transform-runtime` is to actually add imports for helpers, then how can it re-write them?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.