(nodePath, state)
| 90 | |
| 91 | // const x = { version: VERSION }; |
| 92 | Identifier(nodePath, state) { |
| 93 | const binding = nodePath.scope.getBinding(nodePath.node.name); |
| 94 | |
| 95 | if ( |
| 96 | binding |
| 97 | // Don't transform import identifiers. This is meant to mimic webpack's |
| 98 | // DefinePlugin behavior. |
| 99 | || isImportIdentifier(nodePath) |
| 100 | // Do not transform Object keys / properties unless they are computed like {[key]: value} |
| 101 | || nodePath.key === "key" && nodePath.parent.computed === false |
| 102 | || nodePath.key === "property" && nodePath.parent.computed === false |
| 103 | ) { |
| 104 | return; |
| 105 | } |
| 106 | |
| 107 | processNode(state.opts, nodePath, t.valueToNode, identifierComparator); |
| 108 | }, |
| 109 | |
| 110 | // typeof window |
| 111 | UnaryExpression(nodePath, state) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…