Skip to content

Disable Babel in the @babel/runtime package. #11047

@aradzie

Description

@aradzie

Feature Request

  • I would like to work on this feature!

Is your feature request related to a problem? Please describe.
The combination of Webpack with Babel may cause a problem such as #10996 if the @babel/runtime package is not explicitly excluded from Babel. This package contains helper functions which must not be transpiled by Babel. However, if care is not taken to exclude, Webpack will apply Babel to @babel/runtime resulting in a broken bundle.

For example, the Babel runtime contains helper function _typeof(obj) which replaces the typeof operator to recognize Symbols. This function contains few typeof operators internally, and when transpiled by Babel these operators are replaced with the same helper function. Whoops!

Describe the solution you'd like
If Babel contains any exclusion mechanism, it must be applied to package @babel/runtime to prevent the situations as the above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    i: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions