feat: refactoring project
This commit is contained in:
19
node_modules/@babel/helper-compilation-targets/lib/index.js
generated
vendored
19
node_modules/@babel/helper-compilation-targets/lib/index.js
generated
vendored
@@ -159,7 +159,8 @@ function getTargets(inputTargets = {}, options = {}) {
|
||||
esmodules
|
||||
} = inputTargets;
|
||||
const {
|
||||
configPath = "."
|
||||
configPath = ".",
|
||||
onBrowserslistConfigFound
|
||||
} = options;
|
||||
validateBrowsers(browsers);
|
||||
const input = generateTargets(inputTargets);
|
||||
@@ -168,11 +169,17 @@ function getTargets(inputTargets = {}, options = {}) {
|
||||
const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
|
||||
const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
|
||||
if (!browsers && shouldSearchForConfig) {
|
||||
browsers = _browserslist.loadConfig({
|
||||
config: options.configFile,
|
||||
path: configPath,
|
||||
env: options.browserslistEnv
|
||||
});
|
||||
browsers = process.env.BROWSERSLIST;
|
||||
if (!browsers) {
|
||||
const configFile = options.configFile || process.env.BROWSERSLIST_CONFIG || _browserslist.findConfigFile(configPath);
|
||||
if (configFile != null) {
|
||||
onBrowserslistConfigFound == null || onBrowserslistConfigFound(configFile);
|
||||
browsers = _browserslist.loadConfig({
|
||||
config: configFile,
|
||||
env: options.browserslistEnv
|
||||
});
|
||||
}
|
||||
}
|
||||
if (browsers == null) {
|
||||
{
|
||||
browsers = [];
|
||||
|
||||
2
node_modules/@babel/helper-compilation-targets/lib/index.js.map
generated
vendored
2
node_modules/@babel/helper-compilation-targets/lib/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user