Skip to content

Commit b3cd426

Browse files
committed
add check for now dev environment
1 parent 161dde4 commit b3cd426

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ const requireFunc =
88
typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require
99

1010
function isLambda() {
11-
return Boolean(process.env['AWS_LAMBDA_FUNCTION_NAME'])
11+
// check for `now dev` environment first
12+
// because `now dev` sets AWS_LAMBDA_FUNCTION_NAME
13+
if (process.env.NOW_REGION === 'dev1') return false
14+
15+
return Boolean(process.env.AWS_LAMBDA_FUNCTION_NAME)
1216
}
1317

1418
async function requireTf() {

0 commit comments

Comments
 (0)