-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
@babel/cli
Input code
Configuration file name
No response
Configuration
{
"presets": [
[
"@babel/preset-env",
{
"targets": ["chrome 22", "last 12 years"],
"modules": "systemjs"
}
]
]
}
Current and expected behavior
For SystemJS, Babel does not replace the typeof operator with the @babel/helpers typeof function in toPrimitive in certain scenarios.
At the same time, in the browser, I get the error '@@toPrimitive must return a primitive value' because the Symbol from the polyfill is treated as an object, not as 'symbol'
Environment
"@babel/cli": "7.23.4",
"@babel/core": "7.23.7",
"@babel/preset-env": "7.23.8",
OS: macOS 14.2.1
Node: 18.15.0 - ~/.nvm/versions/node/v18.15.0/bin/node
Yarn: 4.0.2 - ~/.nvm/versions/node/v18.15.0/bin/yarn
npm: 9.5.0 - ~/.nvm/versions/node/v18.15.0/bin/npm
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue