Skip to content

Commit cd1dff7

Browse files
committed
Revert "[resolvers/webpack] [refactor] replace lodash/isEqual usage with deep-equal"
This reverts commit 1e81734. Fixes #2857.
1 parent da71746 commit cd1dff7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

resolvers/webpack/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const findRoot = require('find-root');
44
const path = require('path');
5-
const deepEqual = require('deep-equal');
5+
const isEqual = require('lodash/isEqual');
66
const find = require('array.prototype.find');
77
const interpret = require('interpret');
88
const fs = require('fs');
@@ -163,7 +163,7 @@ const MAX_CACHE = 10;
163163
const _cache = [];
164164
function getResolveSync(configPath, webpackConfig, cwd) {
165165
const cacheKey = { configPath, webpackConfig };
166-
let cached = find(_cache, function (entry) { return deepEqual(entry.key, cacheKey, { strict: true }); });
166+
let cached = find(_cache, function (entry) { return isEqual(entry.key, cacheKey); });
167167
if (!cached) {
168168
cached = {
169169
key: cacheKey,

resolvers/webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
"dependencies": {
3333
"array.prototype.find": "^2.2.1",
3434
"debug": "^3.2.7",
35-
"deep-equal": "^2.2.2",
3635
"enhanced-resolve": "^0.9.1",
3736
"find-root": "^1.1.0",
3837
"has": "^1.0.3",
3938
"interpret": "^1.4.0",
4039
"is-core-module": "^2.13.0",
4140
"is-regex": "^1.1.4",
41+
"lodash": "^4.17.21",
4242
"resolve": "^2.0.0-next.4",
4343
"semver": "^5.7.2"
4444
},

0 commit comments

Comments
 (0)