This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
const preprocessor2 = require("./external/builder/preprocessor2.js");
  const licenseHeader = fs.readFileSync("./src/license_header.js").toString();
  const ctx = {
    saveComments: false,
    defines,
  };
  return gulp.src("./src/pdf.sandbox.external.js").pipe(
    transform("utf8", content => {
      content = preprocessor2.preprocessPDFJSCode(ctx, content);
      return `${licenseHeader}\n${content}`;
    })
  );
}
function createTemporaryScriptingBundle(defines, extraOptions = undefined) {
  return createScriptingBundle(defines, {
    disableVersionInfo: !!(extraOptions && extraOptions.disableVersionInfo),
    disableSourceMaps: true,
    disableLicenseHeader: true,
  }).pipe(gulp.dest(TMP_DIR));
}
function createSandboxBundle(defines, extraOptions = undefined) {