babel-plugin-transform-define icon indicating copy to clipboard operation
babel-plugin-transform-define copied to clipboard

OptionalMemberExpression?

Open lencioni opened this issue 6 months ago • 0 comments

I was looking at some code recently that uses process?.env?.NODE_ENV and was curious if this plugin supported transforming this type of code and if so what was the expected behavior. I looked through the implementation and tests and it looks like this is not currently supported in any way, so I'm wondering what you think about OptionalMemberExpression and ideally how it would work.

If the configuration specifies process.env.NODE_ENV that I would expect it to transform process?.env?.NODE_ENV and any other variations using OptionalMemberExpression. What are your thoughts?

Thank you!

lencioni avatar Dec 05 '23 14:12 lencioni