💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
"abcd".replace(/(?<foo>b)/, "[$<bar>]")
Configuration file name
No response
Configuration
Using @babel/plugin-transform-named-capturing-groups-regex
Current and expected behavior
When running the input code, it produces "a[]cd". When transpiling it with Babel, it produces "a[$undefined]cd".
Environment
v7.26
Possible solution
No response
Additional context
No response
💻
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Configuration file name
No response
Configuration
Using
@babel/plugin-transform-named-capturing-groups-regexCurrent and expected behavior
When running the input code, it produces
"a[]cd". When transpiling it with Babel, it produces"a[$undefined]cd".Environment
v7.26
Possible solution
No response
Additional context
No response