Skip to content

Commit

Permalink
[resolvers/webpack] [refactor] remove lodash/get usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 16, 2023
1 parent b9b9c86 commit 2c18c29
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions resolvers/webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const findRoot = require('find-root');
const path = require('path');
const get = require('lodash/get');
const isEqual = require('lodash/isEqual');
const find = require('array.prototype.find');
const interpret = require('interpret');
Expand Down Expand Up @@ -51,15 +50,15 @@ exports.resolve = function (source, file, settings) {

let webpackConfig;

const _configPath = get(settings, 'config');
const _configPath = settings && settings.config;
/**
* Attempt to set the current working directory.
* If none is passed, default to the `cwd` where the config is located.
*/
const cwd = get(settings, 'cwd');
const configIndex = get(settings, 'config-index');
const env = get(settings, 'env');
const argv = get(settings, 'argv', {});
const cwd = settings && settings.cwd;
const configIndex = settings && settings['config-index'];
const env = settings && settings.env;
const argv = settings && typeof settings.argv !== 'undefined' ? settings.argv : {};
let packageDir;

let configPath = typeof _configPath === 'string' && _configPath.startsWith('.')
Expand Down

0 comments on commit 2c18c29

Please sign in to comment.