-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area: commentsoutdatedA 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 issuepkg: generator
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Programmatic API (babel.transform, babel.parse)
Input code
(/* @__PURE__ */ f()).g()Configuration file name
No response
Configuration
None
Current and expected behavior
Currently babel strips the parentheses of (/* @__PURE__ */ f()), causing the whole expression f().g() be marked as pure.
/* @__PURE__ */
f().g();
// expect: same as inputEnvironment
System:
OS: macOS 12.5
Binaries:
Node: 18.6.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.15.0 - /usr/local/bin/npm
npmPackages:
@babel/core: ^7.7.4 => 7.18.9
@babel/plugin-proposal-class-properties: ^7.7.4 => 7.18.6
@babel/plugin-proposal-object-rest-spread: ^7.7.4 => 7.18.9
@babel/plugin-transform-modules-commonjs: ^7.15.0 => 7.18.6
@babel/preset-env: ^7.7.4 => 7.18.9
@babel/preset-react: ^7.7.4 => 7.18.6
@babel/preset-typescript: ^7.7.4 => 7.18.6
babel-loader: ^8.0.6 => 8.2.5
webpack: ^5.74.0 => 5.74.0
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: commentsoutdatedA 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 issuepkg: generator