FormidableLabs / FormidableLabs/babel-plugin-transform-define

OptionalMemberExpression?

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
JavaScript
Stars
242
Forks
29
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.