diff --git a/packages/compartment-mapper/src/bundle.js b/packages/compartment-mapper/src/bundle.js index fe63135f1b..c5b7da2919 100644 --- a/packages/compartment-mapper/src/bundle.js +++ b/packages/compartment-mapper/src/bundle.js @@ -227,6 +227,7 @@ export const makeBundle = async (readPowers, moduleLocation, options) => { const { moduleTransforms, + syncModuleTransforms, dev, tags: tagsOption, conditions: conditionsOption = tagsOption, @@ -327,6 +328,7 @@ export const makeBundle = async (readPowers, moduleLocation, options) => { resolve, makeImportHook, moduleTransforms, + syncModuleTransforms, parserForLanguage, }); await compartment.load(entryModuleSpecifier); diff --git a/packages/ses/scripts/bundle.js b/packages/ses/scripts/bundle.js index 05b9212848..73fa964c61 100644 --- a/packages/ses/scripts/bundle.js +++ b/packages/ses/scripts/bundle.js @@ -29,7 +29,7 @@ const writeBundle = async ({ buildType } = {}) => { const packageJson = JSON.parse(text); const version = packageJson.version; - let moduleTransforms; + let syncModuleTransforms; let bundleFilePaths = [ 'dist/ses.cjs', @@ -44,13 +44,13 @@ const writeBundle = async ({ buildType } = {}) => { if (buildType === 'hermes') { bundleFilePaths = ['dist/ses-hermes.cjs']; terseFilePaths = []; - moduleTransforms = hermesTransforms; + syncModuleTransforms = hermesTransforms; } const bundle = await makeBundle( read, pathToFileURL(resolve('../index.js', import.meta.url)).toString(), - { moduleTransforms }, + { syncModuleTransforms }, ); const versionedBundle = `// ses@${version}\n${bundle}`; diff --git a/packages/ses/scripts/hermes-transforms.js b/packages/ses/scripts/hermes-transforms.js index 1c0d7a299a..8142fcbf53 100644 --- a/packages/ses/scripts/hermes-transforms.js +++ b/packages/ses/scripts/hermes-transforms.js @@ -62,13 +62,7 @@ const asyncGeneratorDestroyer = { }; export const hermesTransforms = { - mjs: async ( - sourceBytes, - specifier, - location, - _packageLocation, - { sourceMap }, - ) => { + mjs: (sourceBytes, specifier, location, _packageLocation, { sourceMap }) => { const transforms = { ...asyncArrowEliminator, ...asyncGeneratorDestroyer,