This is very confusing as seen in #12974 or #12906. My suggestion would be "legacy."
return merge([
    gulp.src(["web/{app_options,viewer_compatibility}.js"], {
      base: ".",
    }),
  ])
    .pipe(transform("utf8", preprocess))
    .pipe(gulp.dest(DEFAULT_PREFERENCES_DIR + "lib/"));
});
gulp.task(
  "default_preferences",
  gulp.series("default_preferences-pre", function (done) {
    var AppOptionsLib = require("./" +
      DEFAULT_PREFERENCES_DIR +
      "lib/web/app_options.js");
    var AppOptions = AppOptionsLib.AppOptions;
    var OptionKind = AppOptionsLib.OptionKind;
    createStringSource(
      "default_preferences.json",
      JSON.stringify(AppOptions.getAll(OptionKind.PREFERENCE), null, 2)
    )
      .pipe(gulp.dest(BUILD_DIR))
      .on("end", done);
  })
);
gulp.task("locale", function () {
  var VIEWER_LOCALE_OUTPUT = "web/locale/";
  console.log();
  console.log("### Building localization files");
  rimraf.sync(VIEWER_LOCALE_OUTPUT);
  mkdirp.sync(VIEWER_LOCALE_OUTPUT);