PHP 7.4.33
Preview: getMinifier.js.flow Size: 880 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/metro-transform-worker/src/utils/getMinifier.js.flow
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 * @oncall react_native
 */

'use strict';

import type {Minifier} from '../index.js';

function getMinifier(minifierPath: string): Minifier {
  // Note: minifierPath should be an absolute path OR a module name here!
  // The options allow relative paths but they HAVE to be normalized at
  // any entry point that accepts them...
  try {
    // $FlowFixMe TODO t0 cannot do require with literal
    return require(minifierPath);
  } catch (e) {
    throw new Error(
      'A problem occurred while trying to fetch the minifier. Path: "' +
        minifierPath +
        '", error message: ' +
        e.message,
    );
  }
}

module.exports = getMinifier;

Directory Contents

Dirs: 0 × Files: 4
Name Size Perms Modified Actions
706 B lrw-r--r-- 2025-03-28 11:04:32
Edit Download
1.11 KB lrw-r--r-- 2025-03-28 11:04:32
Edit Download
319 B lrw-r--r-- 2025-03-28 11:04:32
Edit Download
880 B lrw-r--r-- 2025-03-28 11:04:32
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).