-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Description
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.