Sha256: 5c04de864e7026516a04b45dc258ca7cf90d312836dc5ebd0d7b3f6905c24497
Contents?: true
Size: 1.17 KB
Versions: 23
Compression:
Stored size: 1.17 KB
Contents
import type { ValidatedOptions } from "./validation/options.ts"; import getTargets, { type InputTargets, } from "@babel/helper-compilation-targets"; import type { Targets } from "@babel/helper-compilation-targets"; export function resolveBrowserslistConfigFile( // eslint-disable-next-line @typescript-eslint/no-unused-vars browserslistConfigFile: string, // eslint-disable-next-line @typescript-eslint/no-unused-vars configFilePath: string, ): string | void { return undefined; } export function resolveTargets( options: ValidatedOptions, // eslint-disable-next-line @typescript-eslint/no-unused-vars root: string, ): Targets { const optTargets = options.targets; let targets: InputTargets; if (typeof optTargets === "string" || Array.isArray(optTargets)) { targets = { browsers: optTargets }; } else if (optTargets) { if ("esmodules" in optTargets) { targets = { ...optTargets, esmodules: "intersect" }; } else { // https://github.com/microsoft/TypeScript/issues/17002 targets = optTargets as InputTargets; } } return getTargets(targets, { ignoreBrowserslistConfig: true, browserslistEnv: options.browserslistEnv, }); }
Version data entries
23 entries across 16 versions & 3 rubygems