diff --git a/packages/compartment-mapper/src/bundle.js b/packages/compartment-mapper/src/bundle.js index 3c84903059..1f5e044b61 100644 --- a/packages/compartment-mapper/src/bundle.js +++ b/packages/compartment-mapper/src/bundle.js @@ -145,10 +145,13 @@ const sortedModules = ( * @param {Object} [options] * @param {ModuleTransforms} [options.moduleTransforms] * @param {boolean} [options.dev] + * @param {Set} [options.tags] * @returns {Promise} */ export const makeBundle = async (read, moduleLocation, options) => { - const { moduleTransforms, dev } = options || {}; + const { moduleTransforms, dev, tags: tagsOption } = options || {}; + const tags = new Set(tagsOption); + const { packageLocation, packageDescriptorText, @@ -156,9 +159,6 @@ export const makeBundle = async (read, moduleLocation, options) => { moduleSpecifier, } = await search(read, moduleLocation); - /** @type {Set} */ - const tags = new Set(); - const packageDescriptor = parseLocatedJson( packageDescriptorText, packageDescriptorLocation,