In Webpack 5, the [recommended way](https://webpack.js.org/guides/web-workers/) to create a web worker is

```ts
new Worker(new URL('./worker.js', import.meta.url));
```

Could we update\* the [`pdfjs-dist/webpack` entrypoint](https://github.com/mozilla/pdfjs-dist/blob/master/webpack.js) to use this syntax instead of the legacy `worker-loader`? One of the Webpack contributors told me that `worker-loader` uses "magic" and can cause issues.

\* To maintain compatibility with people still using Webpack 4, we should probably introduce a new entrypoint called `pdfjs-dist/webpack5` (or something like that) rather than changing the existing entrypoint.

Can attempt a PR if you would like.

Closely-related: https://github.com/mozilla/pdf.js/issues/15302


const { AppOptions, OptionKind } = require("./" +
    DEFAULT_PREFERENCES_DIR +
    dir +
    "web/app_options.js");
  return AppOptions.getAll(OptionKind.PREFERENCE);
}
function getDialogPolyfillCSS() {
  return fs
    .readFileSync("node_modules/dialog-polyfill/dist/dialog-polyfill.css")
    .toString();
}
gulp.task("locale", function () {
  const VIEWER_LOCALE_OUTPUT = "web/locale/";
  console.log();
  console.log("### Building localization files");
  rimraf.sync(VIEWER_LOCALE_OUTPUT);
  mkdirp.sync(VIEWER_LOCALE_OUTPUT);
  const subfolders = fs.readdirSync(L10N_DIR);
  subfolders.sort();
  let viewerOutput = "";
  const locales = [];
  for (const locale of subfolders) {
    const dirPath = L10N_DIR + locale;
    if (!checkDir(dirPath)) {
      continue;
    }
    if (!/^[a-z][a-z]([a-z])?(-[A-Z][A-Z])?$/.test(locale)) {