Use env vars from node runtime

This commit is contained in:
Michael Jackson 2021-04-04 22:34:55 -07:00
parent 6568d88e45
commit a5a544695f
1 changed files with 2 additions and 12 deletions

View File

@ -16,9 +16,7 @@ const pkg = require('./package.json');
const buildId = const buildId =
process.env.BUILD_ID || process.env.BUILD_ID ||
execSync('git rev-parse --short HEAD') execSync('git rev-parse --short HEAD').toString().trim();
.toString()
.trim();
const manifest = entryManifest(); const manifest = entryManifest();
@ -94,15 +92,7 @@ const server = {
emitFiles: false emitFiles: false
}), }),
replace({ replace({
'process.env.BUILD_ID': JSON.stringify(buildId), 'process.env.BUILD_ID': JSON.stringify(buildId)
'process.env.CLOUDFLARE_EMAIL': JSON.stringify(
process.env.CLOUDFLARE_EMAIL
),
'process.env.CLOUDFLARE_KEY': JSON.stringify(process.env.CLOUDFLARE_KEY),
'process.env.NPM_REGISTRY_URL': JSON.stringify(
process.env.NPM_REGISTRY_URL
),
'process.env.ORIGIN': JSON.stringify(process.env.ORIGIN)
}) })
] ]
}; };