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?
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 transformprocess?.env?.NODE_ENV
and any other variations using OptionalMemberExpression. What are your thoughts?Thank you!