Skip to content

Commit

Permalink
refactor(ses): use @endo/env-options vs process.env
Browse files Browse the repository at this point in the history
  • Loading branch information
leotm committed Aug 30, 2024
1 parent 977925e commit 5dc71f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ses/scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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 => {
Expand Down

0 comments on commit 5dc71f9

Please sign in to comment.