code: function buildExportInitializationStatements(
    programPath: NodePath,
    metadata: ModuleMetadata,
    loose: boolean = false,
  ) {
    const initStatements = [];
  
    const exportNames = [];
    for (const [localName, data] of metadata.local) {
      if (data.kind === "import") {
        // No-open since these are explicitly set with the "reexports" block.
      } else if (data.kind === "hoisted") {
        initStatements.push(
          buildInitStatement(metadata, data.names, t.identifier(localName)),
        );
      } else {
        exportNames.push(...data.names);
      }
    }
  
    for (const data of metadata.source.values()) {
      if (!loose) {
        initStatements.push(...buildReexportsFromMeta(metadata, data, loose));
      }
      for (const exportName of data.reexportNamespace) {
        exportNames.push(exportName);
      }
    }
  
    initStatements.push(
      ...chunk(exportNames, 100).map(members => {
        return buildInitStatement(
          metadata,
          members,
          programPath.scope.buildUndefinedNode(),
        );
      }),
    );
  
    return initStatements;
  }
docs: Create a set of statements that will initialize all of the statically-known
  export names with their expected values.