15 lines
373 B
Plaintext
15 lines
373 B
Plaintext
|
export default function createNodeEnvConditional(t, production, development) {
|
||
|
return t.conditionalExpression(
|
||
|
t.binaryExpression(
|
||
|
'===',
|
||
|
t.memberExpression(
|
||
|
t.memberExpression(t.identifier('process'), t.identifier('env')),
|
||
|
t.identifier('NODE_ENV')
|
||
|
),
|
||
|
t.stringLiteral('production')
|
||
|
),
|
||
|
production,
|
||
|
development
|
||
|
)
|
||
|
}
|