diff --git a/packages/ses/scripts/bundle.js b/packages/ses/scripts/bundle.js index 3880ec1455..e132a57c13 100644 --- a/packages/ses/scripts/bundle.js +++ b/packages/ses/scripts/bundle.js @@ -5,6 +5,7 @@ import fs from 'fs'; import { makeBundle } from '@endo/compartment-mapper/bundle.js'; import { minify } from 'terser'; import { fileURLToPath, pathToFileURL } from 'url'; +import { getEnvironmentOption as getenv } from '@endo/env-options'; import { hermesTransforms } from './hermesTransforms.js'; const resolve = (rel, abs) => fileURLToPath(new URL(rel, abs).toString()); @@ -102,7 +103,8 @@ const writeBundle = async ({ buildType } = {}) => { }; const main = async () => { - await writeBundle({ buildType: process.env.SES_BUILD_TYPE || 'vanilla' }); + const buildType = getenv('SES_BUILD_TYPE', 'vanilla'); + await writeBundle({ buildType }); }; main().catch(err => {