[now-node] Use project env vars in startDevServer() and respect NODEJS_HELPERS env var (#4211)

Depends on #4210.
This commit is contained in:
Nathan Rajlich
2020-04-30 15:12:46 -07:00
committed by GitHub
parent fb07360b71
commit 7b1893b9f7
2 changed files with 5 additions and 2 deletions

View File

@@ -48,7 +48,9 @@ async function main() {
const config = JSON.parse(process.env.NOW_DEV_CONFIG || '{}');
delete process.env.NOW_DEV_CONFIG;
const shouldAddHelpers = config.helpers !== false;
const shouldAddHelpers = !(
config.helpers === false || process.env.NODEJS_HELPERS === '0'
);
const entrypointPath = path.join(process.cwd(), entrypoint);
const handler = await import(entrypointPath);